This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[ID 19991001.001] perlguts man page error
authorPiotr Klaban <makler@oryl.man.torun.pl>
Fri, 1 Oct 1999 10:23:49 +0000 (12:23 +0200)
committerJarkko Hietaniemi <jhi@iki.fi>
Fri, 1 Oct 1999 10:26:19 +0000 (10:26 +0000)
To: perl5-porters@perl.org
Message-Id: <199910010823.KAA05796@oryl.man.torun.pl>

p4raw-id: //depot/cfgperl@4269

pod/perlguts.pod

index a535048..d0f9167 100644 (file)
@@ -107,9 +107,10 @@ 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:
 
+       SV *s;
        STRLEN len;
        char * ptr;
-       ptr = SvPV(len);
+       ptr = SvPV(s, len);
        foo(ptr, len);
 
 If you want to know if the scalar value is TRUE, you can use: