in reply to Redirecting XS stdout
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)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Redirecting XS stdout
by Anonymous Monk on Feb 21, 2010 at 01:12 UTC | |
|
Re^2: Redirecting XS stdout
by innominate (Beadle) on Feb 21, 2010 at 05:33 UTC | |
by ikegami (Patriarch) on Feb 21, 2010 at 06:18 UTC | |
by cdarke (Prior) on Feb 21, 2010 at 08:24 UTC | |
by innominate (Beadle) on Feb 21, 2010 at 08:18 UTC |