in reply to Re^2: Sending PerlIO* to the stack for call_sv()?
in thread Sending PerlIO* to the stack for call_sv()?

A PerlIO* isn't a scalar, so you can't put it on the stack. FYI, to get a PerlIO* from a filehandle created in Perl, you use...

PerlIO* outstream = IoOFP( sv_2io(out_fh_ref_sv) ); PerlIO* instream = IoIFP( sv_2io(in_fh_ref_sv) );

Note that IoOFP and IoIFP are not officially blessed in perlapi, but people are using them in CPAN code, and it's the only way to get the job done.

As for going the other way, what you're doing looks right to me, but I'm not a guru.

--
Marvin Humphrey
Rectangular Research ― http://www.rectangular.com