----- Original Message ----- From: "Sherm Pendley" <[EMAIL PROTECTED]> To: "Sisyphus" <[EMAIL PROTECTED]> Cc: "xs" <perl-xs@perl.org> Sent: Tuesday, April 04, 2006 1:11 PM Subject: Re: FILE* to PerlIO*
> On Apr 3, 2006, at 9:46 PM, Sisyphus wrote: > > > One thing that puzzles me is that 'perldoc perlclib' recommends > > using the > > PerlIO* types instead of the FILE* types. If that's the > > recommendation, then > > it seems anomalous that perl facilitates the passing of a FILE* > > from perl to > > XS, but not the passing of a PerlIO* from perl to XS. (At least > > that's the > > way it appears to me at the moment.) > > Does Inline::C use typemaps? Yep - and it finds the standard typemaps by default. Unfortunately those typemaps are incapable of counteracting syntax errors in my xs code. (This is a major inadequacy imho :-) I had tried passing the arg as a PERLIO*, and when that didn't work I assumed it was because no such typemap existed. On copying and pasting the code that Marvin posted, I discovered that I must have made a silly syntax error in my initial attempts - because it is, in fact, as straightforward, simple and sensible as it ought to be. Cheers, Rob