Arthur Bergman <[EMAIL PROTECTED]> wrote:

> The function is a C function.  And yes it is a custom PMC which I have
> already created.

The interface for calling C code from PASM is NCI (native call
interface). s. e.g. library/*.pasm or t/pmc/nci.t.
But inside your custom PMC you can do all kinds of things, to stuff a
pointer into e.g. data.

- at init time init_pmc() has an extra pointer argument
- via a customized vtable method:
  e.g. set_pmc, set_pmc_keyed or push or whatever

Vtable calls seem still to be missing in the extension interface though.

> Dan pointed out the unmanagedstruct.pmc which but I fail to see how
> that would help me, I think we need an external API for stashing raw
> pointers.

unmanagaged struct isn't finished yet. But extending the switch
statements by an enum_type_ptr case is really simple.
library/libpcre.imc has an example to get match results via an
unmanagedstruct PMC.

> Arthur

leo

Reply via email to