Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Inline::C demonstration for C programmers

by syphilis (Archbishop)
on Sep 01, 2008 at 06:16 UTC ( [id://708117] : note . print w/replies, xml ) Need Help??


in reply to Re: Inline::C demonstration for C programmers
in thread Inline::C demonstration for C programmers

Are the strings in *inflect guaranteed to exist after you leave it?

Those strings are simply return values. As long as inflect() returns the appropriate one (which it does), I don't think it matters where/when/if those strings exist.

Cheers,
Rob

Replies are listed 'Best First'.
Re^3: Inline::C demonstration for C programmers
by sasdrtx (Friar) on Sep 01, 2008 at 13:16 UTC
    Just to beat the last bit of life out of this horse: inflect() returns a pointer to one of the strings (alluded to by the others). Note the char* type. So, if those strings were automatics, then the GP post would have been quite correct. I.e. it would return a pointer to freed stack space.

    sas