Update: Yup, that does the trick:
void c_output() { PerlIO_printf(PerlIO_stdout(), "###c_output"); } void c_output_newline() { PerlIO_printf(PerlIO_stdout(), "###c_output_newline\n"); }
>set PERLIO=stdio >perl a.pl ===============dry run============ printing [perl_output_newline] ***perl_output_newline calling [c_output_newline] ###c_output_newline printing [perl_output] ***perl_output calling [c_output] ###c_output =============test_global========== printing [perl_output_newline] calling [c_output_newline] printing [perl_output] calling [c_output] test_global buffer: (***perl_output_newline\n###c_output_newline\n***perl_output###c_outpu +t) >set PERLIO=perlio >perl a.pl ===============dry run============ printing [perl_output_newline] ***perl_output_newline calling [c_output_newline] ###c_output_newline printing [perl_output] calling [c_output] ***perl_output###c_output =============test_global========== printing [perl_output_newline] calling [c_output_newline] printing [perl_output] calling [c_output] test_global buffer: (***perl_output_newline\n###c_output_newline\n***perl_output###c_outpu +t)
In reply to Re: Redirecting XS stdout
by ikegami
in thread Redirecting XS stdout
by innominate
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |