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?