produce redeclaration warning on C<our $foo; { our $foo; ... }>
[p5sagit/p5-mst-13.2.git] / pod / perlguts.pod
index a535048..a8d820e 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:
@@ -1098,10 +1099,15 @@ this:
 
   SAVEDELETE(PL_defstash, savepv(tmpbuf), strlen(tmpbuf));
 
-=item C<SAVEDESTRUCTOR(f,p)>
+=item C<SAVEDESTRUCTOR(DESTRUCTORFUNC_NOCONTEXT_t f, void *p)>
 
 At the end of I<pseudo-block> the function C<f> is called with the
-only argument (of type C<void*>) C<p>.
+only argument C<p>.
+
+=item C<SAVEDESTRUCTOR_X(DESTRUCTORFUNC_t f, void *p)>
+
+At the end of I<pseudo-block> the function C<f> is called with the
+implicit context argument (if any), and C<p>.
 
 =item C<SAVESTACK_POS()>