in reply to converting perl file handle into C FILE *
If all you want is a FILE * that is open on the same filedescriptor (which means that buffered I/O will almost certainly be broken), you can get the fileno from Perl, then create a FILE * on that using fdopen(3). That's probably not very safe though, because Perl will eventually close the handle leaving your FILE * pointing at a dead handle.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
|---|