Re: Calling parrot from C?

2003-09-01 Thread Leopold Toetsch
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

Re: Calling parrot from C?

2003-09-01 Thread Luke Palmer
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

Re: Calling parrot from C?

2003-08-17 Thread Benjamin Goldberg
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

Re: Calling parrot from C?

2003-08-16 Thread Leopold Toetsch
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(

Re: Calling parrot from C?

2003-08-15 Thread TOGoS
--- 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

Re: Calling parrot from C?

2003-08-15 Thread Sean O'Rourke
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

Calling parrot from C?

2003-08-15 Thread Luke Palmer
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