[BioLib-dev] Perl file pointers
Chris Fields
cjfields at illinois.edu
Mon Feb 8 19:30:05 UTC 2010
On Mon, 2010-02-08 at 13:23 -0600, Adam A Smith wrote:
> > I'm guessing the appropriate mapping needs to be done in the
> > perl-specific SWIG files in src/mappings/swig/perl. I'll see if I can
> > get it working, but for now we'll need to assume it's not implemented.
>
> I ran into some of that when I was trying to SWIGify everything this last
> summer. (I was beginning to look into it myself, when I got swept up in
> the rest of my life.) Let me know if you find a solution--I'm very
> curious for my own sake.
>
> Adam
I think it's just calling in a specific typemap, something along the
lines of (for perl):
%typemap(in) FILE * {
$1 = PerlIO_findFILE(IoIFP(sv_2io($input)));
}
Investigating it, perl uses a PerlIO * instead of a simple FILE *, so
the above is necessary. Python/Ruby/etc may not need that. Regardless,
I haven't managed to get that working, so I'm scrounging CPAN for a few
SWIG-derived packages to see if there is anything there.
chris
More information about the BioLib-dev
mailing list