This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pod: mention SvPVCLEAR()
authorYves Orton <demerphq@gmail.com>
Wed, 19 Oct 2016 08:58:30 +0000 (10:58 +0200)
committerYves Orton <demerphq@gmail.com>
Wed, 19 Oct 2016 11:28:00 +0000 (13:28 +0200)
pod/perlguts.pod
pod/perlhacktut.pod

index 576a41c..a6aba00 100644 (file)
@@ -186,7 +186,7 @@ sv_insert() or sv_insert_flags().
 If you don't need the existing content of the SV, you can avoid some
 copying with:
 
-    sv_setpvs(sv, "");
+    SvPVCLEAR(sv);
     s = SvGROW(sv, needlen + 1);
     /* something that modifies up to needlen bytes at s, but modifies
        newlen bytes
index 4143ec3..72919fc 100644 (file)
@@ -74,7 +74,7 @@ of C<pat>:
 
     items = SP - MARK;
     MARK++;
-    sv_setpvs(cat, "");
+    SvPVCLEAR(cat);
  +  patcopy = pat;
     while (pat < patend) {