in reply to embedding perl in c?
FREETMPS is cleaning up any temporary variables/values, which includes the return values of the Perl subroutine, so you have to copy your out_string in case you need it beyond FREETMPS. (Put the printf... statement immediately after out_string = POPp; and you'll see that things are working fine.)
BTW, POPp is deprecated — use POPpx instead, which also gives you the length of the string.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: embedding perl in c?
by jrs (Initiate) on Jun 13, 2008 at 17:22 UTC |