From leo@yuriev.ru Tue Oct 20 21:14:46 2015 From: leo@yuriev.ru To: openldap-bugs@openldap.org Subject: Re: (ITS#8270) win32: fix conversion error Date: Tue, 20 Oct 2015 21:14:44 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0126113955408231281==" --===============0126113955408231281== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable --001a11c23788b1353405228fbfbd Content-Type: text/plain; charset=3DUTF-8 2015-10-20 23:09 GMT+03:00 : > nacho.resa(a)gmail.com wrote: > > --047d7bb03a5ac118d20522842ead > > Content-Type: text/plain; charset=3DUTF-8 > > > > So I took another closer look at this issue and I went for this possible > > solution: > > > https://github.com/nice-software/lmdb/commit/03987789735141dc68ae8b2d0e5ad5= 2d82cc80d0 > > 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 =3D the caller is responsible to clean stack from args (e.g. addl esp, N); stdcall =3D the callee is responsible to clean stack from args (e.g. retn N); --001a11c23788b1353405228fbfbd Content-Type: text/html; charset=3DUTF-8 Content-Transfer-Encoding: quoted-printable
= 2015=3D -10-20 23:09 GMT+03:00 <hyc(a)symas.com>:
nacho.resa(a)gmail.com wrote:
> --047d7bb03a5ac118d20522842ead
> Content-Type: text/plain; charset=3D3DUTF-8
>
> So I took another closer look at this issue and I went for this possib=3D le
> solution:
> https://= gi=3D thub.com/nice-software/lmdb/commit/03987789735141dc68ae8b2d0e5ad52d82cc80d0=3D

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<=3D br> here? stdcall uses Pascal argument order instead of C order but it's mo=3D ot
since the function only has 1 argument.


No, there is another important difference:
cdecl =3D3D the caller is responsible to clean stack from args (e.g.= =3D addl esp, N);
stdcall =3D3D the callee is responsible to clean stack fr= =3D om args (e.g. retn N);=3DC2=3DA0
--001a11c23788b1353405228fbfbd-- --===============0126113955408231281==--