This is the mail archive of the libffi-discuss@sources.redhat.com mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: minimal closure usage


On Tue, 2002-04-30 at 02:37, Sam Liddicott wrote:
> Is there a simpler way to preserve all the old arguments but prepend or
> append the user_data as an additional one?  Or does the wrapped function
> have to have a calling signature of (ffi_cif*, void*, void**, void*)?

Not that I'm aware of.  One hack might be to simply shove the user_data
in some form of thread local data instead of passing it in as an arg.

> (BTW: Is there an array/structure/function/full-set-of-rules to convert
> between "int" and "ffi_type_sint" etc?  SWIG would need to refer to this as
> it generates the sample code below)

No, not really.  I think, however, that "int" always ==
"ffi_type_sint".  It's just the ffi_type_sint32, etc, which are platform
specific.

AG



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]