ffi library port to Windows
Enrico Migliore <[email protected]> Wed, 17 May 2006 14:06:26 +0200
| Newsgroups | gmane.comp.java.vm.sablevm.general |
|---|---|
| Organization | - |
| Message-ID | <[email protected]> |
Hi Etienne,
I'm studyng the assembly function (written for GCC on WIN32):
ffi_call_STDCALL()
included in the assembly file: win32.s
That function embeds all the compiler/OS/CPU dependancies. Once
translated and tested in the assembly language for MSVC, the task of
porting the ffi library to Windows is done.
question
--------
ffi_call_STDCALL() is supposed to receive the actual parameters from the
stack. That means that ffi is only able to jump correctly into C codes
compiled with the following qualifier:
__stdcall
Therefore, all the foreing functions, compiled with the following qualifier:
__cdecl
which is the default for MSVC applications, might not be correctly
called by the ffi library.
That Is that ok?
Enrico
P.S
In the next days, I'm gonna read the MSVC documentation in order to
understand the difference between __cdecl and __stdcall qualifiers.