This is the mail archive of the
libffi-discuss@sourceware.org
mailing list for the libffi project.
Re: RFC: Delegates (or something)
- From: William Ahern <william at 25thandClement dot com>
- To: libffi-discuss at sourceware dot org
- Date: Sat, 25 Apr 2009 20:19:42 -0700
- Subject: Re: RFC: Delegates (or something)
- References: <20090418220433.GA442@wilbur.25thandClement.com>
On Sat, Apr 18, 2009 at 03:04:33PM -0700, William Ahern wrote:
> I'm curious of people's thoughts on this. Especially if somebody can point
> out a bug, including the "you just got lucky that it works" kind.
>
> Not exactly sure what the proper terminology is called. It's very similar to
> what C# calls delegates, except you can't pass new parameters to the
> invocation. Similar to a lambda expression, perhaps. Practically speaking,
> it's a neat hack to abstract away (with what _should_ be almost zero
> overhead) manually initializing and invoking the ffi_cif object by using
> GCC's type introspection capabilities.
>
Updated code here:
http://25thandclement.com/~william/projects/delegate.c.html