From: Kenneth Albanowski Date: Sat, 23 Jan 1999 21:52:15 +0000 (-0500) Subject: Re: SvOPV() or SvPV_nolen() or ... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ce2f5d8f75586e7887cacd21ed88285c7953d9fc;p=p5sagit%2Fp5-mst-13.2.git Re: SvOPV() or SvPV_nolen() or ... Message-ID: p4raw-id: //depot/perl@2913 --- diff --git a/pod/perlguts.pod b/pod/perlguts.pod index ce8c182..9c4831f 100644 --- a/pod/perlguts.pod +++ b/pod/perlguts.pod @@ -103,6 +103,15 @@ be accessed in thread-local storage in threaded Perl. In any case, remember that Perl allows arbitrary strings of data that may both contain NULs and might not be terminated by a NUL. +Also remember that C doesn't allow you to safely say C. It might work with your compiler, but it won't work for everyone. +Break this sort of statement up into separate assignments: + + STRLEN len; + char * ptr; + ptr = SvPV(len); + foo(ptr, len); + If you want to know if the scalar value is TRUE, you can use: SvTRUE(SV*)