Luke Palmer <[EMAIL PROTECTED]> wrote:
> Also, I can't seem to figure out how to make a CSub which calls to a
> user-provided perl sub.
Please use the NCI interface. You can call arbitrary C functions with
it. S. classes/parrotio.pmc or Parrot_compreg() and the docs.
> Thanks again,
> Luke
leo
Leopold Toetsch writes:
> Luke Palmer <[EMAIL PROTECTED]> wrote:
> > How does one call a parrot Sub from C and get the return value(s)? Is
> > it even possible, given CPS, to do this generally? If not, how can I
> > check when it is?
>
> Good question. Its very similar to classes/Eval.pmc:invoke
Togos wrote:
>
> --- Sean O'Rourke <[EMAIL PROTECTED]> wrote:
> > Luke Palmer <[EMAIL PROTECTED]>
> > writes:
> >
> > > How does one call a parrot Sub from
> > > C and get the
> >
> > I'd vote for stuffing args into the
> > interpreter, calling the sub's invoke()
> > method, then digging through
Luke Palmer <[EMAIL PROTECTED]> wrote:
> How does one call a parrot Sub from C and get the return value(s)? Is
> it even possible, given CPS, to do this generally? If not, how can I
> check when it is?
Good question. Its very similar to classes/Eval.pmc:invoke().
You would do:
- call runops_int(
--- Sean O'Rourke <[EMAIL PROTECTED]> wrote:
> Luke Palmer <[EMAIL PROTECTED]>
> writes:
>
> > How does one call a parrot Sub from
> > C and get the
>
> I'd vote for stuffing args into the
> interpreter, calling the sub's invoke()
> method, then digging through the registers
> to pull out the ret
Luke Palmer <[EMAIL PROTECTED]> writes:
> How does one call a parrot Sub from C and get the return value(s)?
I'd vote for stuffing args into the interpreter, calling the sub's
invoke() method, then digging through the registers to pull out the
return values (see e.g. Parrot_pop_argv in method_uti
How does one call a parrot Sub from C and get the return value(s)? Is
it even possible, given CPS, to do this generally? If not, how can I
check when it is?
Thanks,
Luke