Data::Dumper: Optimize XPUSH's to EXTEND(), PUSH,...
authorSteffen Mueller <smueller@cpan.org>
Mon, 22 Oct 2012 18:19:29 +0000 (20:19 +0200)
committerSteffen Mueller <smueller@cpan.org>
Mon, 22 Oct 2012 18:19:29 +0000 (20:19 +0200)
dist/Data-Dumper/Dumper.pm
dist/Data-Dumper/Dumper.xs

index 925d9dd..d7d2b6b 100644 (file)
@@ -10,7 +10,7 @@
 package Data::Dumper;
 
 BEGIN {
-    $VERSION = '2.136'; # Don't forget to set version and release
+    $VERSION = '2.137'; # Don't forget to set version and release
 }                         # date in POD!
 
 #$| = 1;
@@ -1359,7 +1359,7 @@ modify it under the same terms as Perl itself.
 
 =head1 VERSION
 
-Version 2.136  (October 04 2012)
+Version 2.137  (October 22 2012)
 
 =head1 SEE ALSO
 
index 6ec4dbf..8c9a81d 100644 (file)
@@ -1121,10 +1121,11 @@ Data_Dumper_Dumpxs(href, ...)
                SAVETMPS;
                
                PUSHMARK(sp);
-               XPUSHs(href);
-               XPUSHs(sv_2mortal(newSVsv(ST(1))));
+                EXTEND(SP, 3); /* 3 == max of all branches below */
+               PUSHs(href);
+               PUSHs(sv_2mortal(newSVsv(ST(1))));
                if (items >= 3)
-                   XPUSHs(sv_2mortal(newSVsv(ST(2))));
+                   PUSHs(sv_2mortal(newSVsv(ST(2))));
                PUTBACK;
                i = perl_call_method("new", G_SCALAR);
                SPAGAIN;