Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: XSub won't write to memory file

by Anonymous Monk
on Jul 08, 2015 at 21:50 UTC ( [id://1133822]=note: print w/replies, xml ) Need Help??


in reply to XSub won't write to memory file

Dont use libc's fprintf and fflush. How will libc know about scalars strings as file handles? Try PerlIO_printf and PerlIO_flush.

Replies are listed 'Best First'.
Re^2: XSub won't write to memory file
by syphilis (Archbishop) on Jul 09, 2015 at 12:38 UTC
    Dont use libc's fprintf and fflush

    But there's no problem with fprintf and fflush if the filehandle is STDOUT, or STDERR, or is attached to a regular file.
    Why should they be a problem when the filehandle is attached to a "memory file" ?

    In any case, the function that's doing the fprintf/fflush is a 3rd party library function which I'm not going to modify.

    I'm not in desperate need of getting this to work ... I just thought it was odd, and am still interested to know the cause of the problem.

    Cheers
    Rob

      because thats a perl only feature, and if you're not using the perl api, then its not going to work

      libc doesn't know about perls inmemory filehandles

Re^2: XSub won't write to memory file
by Anonymous Monk on Jul 09, 2015 at 00:08 UTC
    isn't Inline supposed to arrange for the overrides?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1133822]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-20 03:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found