rt74170: handle the stack changing in the custom sort functions
authorTony Cook <tony@develop-help.com>
Mon, 6 Sep 2010 13:40:24 +0000 (23:40 +1000)
committerTony Cook <tony@develop-help.com>
Mon, 6 Sep 2010 13:40:24 +0000 (23:40 +1000)
Based on work by Father Chrysostomos <sprout@cpan.org>, but all
my fault.

dist/Data-Dumper/Dumper.xs

index f2c1821..52a57f8 100644 (file)
@@ -1188,10 +1188,12 @@ Data_Dumper_Dumpxs(href, ...)
                    else
                        newapad = apad;
                
+                   PUTBACK;
                    DD_dump(aTHX_ val, SvPVX_const(name), SvCUR(name), valstr, seenhv,
                            postav, &level, indent, pad, xpad, newapad, sep, pair,
                            freezer, toaster, purity, deepcopy, quotekeys,
                            bless, maxdepth, sortkeys);
+                   SPAGAIN;
                
                    if (indent >= 2 && !terse)
                        SvREFCNT_dec(newapad);