This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
generic "call-forwarding" closure
- From: nf2 <nf2 dot email at gmail dot com>
- To: libffi-discuss at sourceware dot org
- Date: Mon, 11 May 2009 22:34:09 +0200
- Subject: generic "call-forwarding" closure
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)?
Regards,
Norbert