This is the mail archive of the libffi-discuss@sourceware.org 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: generic "call-forwarding" closure


nf2 wrote:
Hi,

I'm pretty new to libffi and got the following problem:

For auto-generating C++ language bindings for C libraries i would like
to use a ffi closure to pass an extra user-data argument to the
callback handler (for callbacks, which don't provide a user_data arg).
I wonder if it would be possible to write a generic ffi closure, which
just appends a void * user_data to the argument list and passes the
call on with ffi_call (without knowledge about the other arguments)?
I'm not really following this. Could you please give an example of how you'd use this?

Thanks,

AG


Regards,
Norbert


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