[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#8270) win32: fix conversion error

Ð?еонид ЮÑ?Ñ?ев wrote:
> 2015-10-20 23:09 GMT+03:00 <hyc@symas.com <mailto:hyc@symas.com>>:
>     nacho.resa@gmail.com <mailto:nacho.resa@gmail.com> wrote:
>      > --047d7bb03a5ac118d20522842ead
>      > Content-Type: text/plain; charset=UTF-8
>      >
>      > So I took another closer look at this issue and I went for this possible
>      > solution:
>      >
>     https://github.com/nice-software/lmdb/commit/03987789735141dc68ae8b2d0e5ad52d82cc80d0
>     That looks OK.
>      > Basically it errors out because MSVC needs stdcall on that method.
>     You realize of course, that this change actually has no effect on the code
>     here? stdcall uses Pascal argument order instead of C order but it's moot
>     since the function only has 1 argument.

> No, there is another important difference:
> cdecl = the caller is responsible to clean stack from args (e.g. addl esp, N);
> stdcall = the callee is responsible to clean stack from args (e.g. retn N);

True, but not relevant here. This is a ThreadProc, and threads never return to 
their caller. Windows implicitly calls ExitThread() when this function 
returns, and the stack will be destroyed anyway.

   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/