On Wed, Mar 17, 2010 at 10:42 AM, Peter Lobsinger <[email protected]> wrote:
> In that case, a similar argument can be made for an interface that
> uses a void *[] or callbacks. Works from C, takes C datatypes, gives a
> logical place to transition between managed/unmanaged code.

Argument can definitely be made, yes. A function that uses callbacks
or a void*[]  would still need to allocate a CallContext internally
and marshal data from whichever input format into the CallContext for
the invocation. So we're not saving on performance at all to add the
extra C-friendly indirection.

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.

--Andrew Whitworth
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev

Reply via email to