This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: generic "call-forwarding" closure
nf2 wrote:
> my requirement would be a generic closure, which doesn't know about
> the exact types of the parameters, but - on invocation - just calls
> another function pushing a copy of the parameters stack frame onto the
> stack again, extended with the user_data pointer...
I'm not sure this is possible. Some arches pass args in registers and
in memory depending on what type they are. So, in order to know where
an arg is, you have to know its type.
Andrew.