On Friday 18 January 2008 20:25:16 Allison Randal wrote:

> It's true that the generalized solution for varying callback signatures
> doesn't exist yet, but it's easy enough to create your own C callback
> layer, with a separate C function for each callback you need. (Note, not
> one-per-signature, but one-per-callback.) The callback functions can
> invoke a Parrot sub that they lookup by name, register a callback sub
> with the concurrency scheduler, or simply directly perform the actions
> needed.

I'm not even sure *that* will work.  To invoke a Sub PMC from C, you need to 
pass in an Interp as well as the PMC.  Unless you know both of those at 
compile time, I'm not sure how to make the callback mechanism work.

... although I just had an evil idea regarding memcpy and a hash table.

-- c

Reply via email to