Calling functions whose signature/arguments are only known at runtime

Joshua Tolley eggyknap at
Wed Mar 17 15:14:45 UTC 2010

On Wed, Mar 17, 2010 at 11:02:18AM -0400, Andrew Whitworth wrote:
> At this point it almost becomes a question of preference: would users
> prefer to Parrot_pmc_new a CallContext and populate it through VTABLE
> calls, manually allocate a memory buffer with args (and then have to
> manually deallocate it again), or provide a series of callback
> function pointers? I know which one I would prefer, but I'm a
> particular case and hardly representative of our users at large.

As someone who's trying to make use of thse interfaces, my first guess is I'd
prefer creating a CallContext, but it's not something I feel strongly about
either way at all. Provided the interface is available from C, unlikely to
change rapidly in the near future, and documented adequately for me to figure
out what I'm doing, I'm happy. Of those three criteria, both methods seem to
meet the first. The second is still up in the air, and as to the third I admit
not yet having looked closely enough to determine one way or the other.

Joshua Tolley / eggyknap
End Point Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <>

More information about the parrot-dev mailing list