# New Ticket Created by  Matt Diephouse 
# Please include the string:  [perl #34452]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=34452 >


This TODO item is from an email from Leo, reproduced below with some 
context.

Message-ID: <[EMAIL PROTECTED]>

--------Original Message--------
William Coleda <[EMAIL PROTECTED]> 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

Reply via email to