This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
dist/Data-Dumper: switch to using SvPVCLEAR()
authorYves Orton <demerphq@gmail.com>
Wed, 19 Oct 2016 08:56:00 +0000 (10:56 +0200)
committerYves Orton <demerphq@gmail.com>
Wed, 19 Oct 2016 11:28:00 +0000 (13:28 +0200)
dist/Data-Dumper/Dumper.xs

index 017904e..25886d7 100644 (file)
@@ -1575,7 +1575,7 @@ Data_Dumper_Dumpxs(href, ...)
                        sv_catpvs(retval, ";");
                         sv_catsv(retval, style.sep);
                    }
-                   sv_setpvs(valstr, "");
+                   SvPVCLEAR(valstr);
                    if (gimme == G_ARRAY) {
                        XPUSHs(sv_2mortal(retval));
                        if (i < imax)   /* not the last time thro ? */