Re: AW: XS to return Perl Arrays - and NetWare Select()
[email protected] (NormW)
| Newsgroups | perl.xs |
|---|---|
| Message-ID | <[email protected]> |
G/Morning, On 10/06/2011 4:14 PM, Bolhar-Nordenkampf Ferdinand wrote: >> Perhaps you meant: >> >> my ($ro, $wo, $eo) = nw_select(\@ri, \@wi, \@ei, $wait); > > That were my first thoughts too when I saw this code - a function can > return a single list only - and Perl can't know how this list should > be divided in two or more arrays. One has to return a list of scalars > holding references to the appropriate arrays (or a single array whose > elements contain the references). AFAICT from the PerlXS doc, RETVAL has a 'limit' of one value returned, so RETVAL won't work in my 'envisaged' function, but it seems possible to return any number of vars via stack manipulation (subject to size) using the ST(n) array. > > Regards, Ferry -- Norm > > Ing. Ferry Bolhár-Nordenkampf Magistrat der Stadt Wien - MA 14 A-1010 > Wien E-mail: [email protected] > > "Wenn hier einer schuld ist, dann immer nur der Computer." >