[cffi-devel] vararg / New foreign library interface
Hoehle, Joerg-Cyril
Joerg-Cyril.Hoehle at t-systems.com
Tue Jan 10 12:07:29 UTC 2006
Luís Oliveira wrote:
>Allegro resets the stack pointer to whatever value it had before
>pushing the foreign call's arguments to the stack. This approach
>works for either stdcall or cdecl.
I forgot this other issue:
This approach is good enough for Lisp to C. But what about callbacks, i.e. C to Lisp?
Do you know how a foreign function would react when returned an unexpected stack pointer? gcc -fno-omit-frame-pointer helps around this, but is not general.
Without a hint, one simply doesn't know what calling convention the foreign caller expects. Clean up the stack or not, that is the question.
Regards,
Jörg Höhle.
More information about the cffi-devel
mailing list