This TODO item is from an email from Leo, reproduced below with some
context.
Message-ID: <200503150803...@thu8.leo.home>
--------Original Message--------
William Coleda <wi...@coleda.com> wrote:
> Given the perldoc for src/extend.c,
>
> "void* Parrot_call_sub(Parrot_INTERP interpreter, Parrot_PMC
sub, const
> char *signature, ...)"
> Call a parrot subroutine the given function signature. The
first
> char in "signature" denotes the return value. Next chars
are argu-
> ments.
>
> The return value of this function can be void or a pointer
type.
>
> If only the first character is the return value, how does one deal
> with subroutines that return multiple values?
Well, you can't access multiple return values from within the C
function, where you are calling the PIR code. OTOH, if the PIR code did
return more values, we should get them back to the caller.
We should probably have a new return signature for this, e.g.
"@" - collect all return values, stuff them into an array and return
that.
OTOH you could use Parrot_runops_fromc() and pick up return values from
the returned frame pointer C<bp>.
leo