diff options
author | Kenneth Albanowski <kjahds@kjahds.com> | 1999-01-23 16:52:15 -0500 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-02-14 10:03:51 +0000 |
commit | ce2f5d8f75586e7887cacd21ed88285c7953d9fc (patch) | |
tree | 9e5922a72e48626e46660f0112f1dc997fc69f32 /pod/perlguts.pod | |
parent | 1fa8b10d8c0f0780dab42b408cc071b5f7ee992b (diff) | |
download | perl-ce2f5d8f75586e7887cacd21ed88285c7953d9fc.tar.gz |
Re: SvOPV() or SvPV_nolen() or ...
Message-ID: <Pine.LNX.3.93.990123212857.446B-100000@kjahds.kjahds.com>
p4raw-id: //depot/perl@2913
Diffstat (limited to 'pod/perlguts.pod')
-rw-r--r-- | pod/perlguts.pod | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pod/perlguts.pod b/pod/perlguts.pod index ce8c182508..9c4831faa2 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<foo(SvPV(s, len), +len);>. 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*) |