diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-09-07 23:00:10 +0200 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-09-07 23:00:10 +0200 |
commit | 4bbdbd5179acbefcf9f85b21c8e529c8c4881e0e (patch) | |
tree | c02d4c9c8b50ec818680cf735ca8536fd23dd701 /dist | |
parent | 666c7ca6f69d448e1829e85a89fae74e72c1a677 (diff) | |
download | perl-4bbdbd5179acbefcf9f85b21c8e529c8c4881e0e.tar.gz |
In Dumper.xs, use sv_newmortal() instead of sv_mortalcopy(&PL_sv_undef).
The two produce identical results. The former is terser, and far more
efficient.
Diffstat (limited to 'dist')
-rw-r--r-- | dist/Data-Dumper/Dumper.pm | 4 | ||||
-rw-r--r-- | dist/Data-Dumper/Dumper.xs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/dist/Data-Dumper/Dumper.pm b/dist/Data-Dumper/Dumper.pm index 9335d034c1..883572178f 100644 --- a/dist/Data-Dumper/Dumper.pm +++ b/dist/Data-Dumper/Dumper.pm @@ -9,7 +9,7 @@ package Data::Dumper; -$VERSION = '2.133'; # Don't forget to set version and release date in POD! +$VERSION = '2.134'; # Don't forget to set version and release date in POD! #$| = 1; @@ -1297,7 +1297,7 @@ modify it under the same terms as Perl itself. =head1 VERSION -Version 2.133 (July 20 2011) +Version 2.134 (September 7 2011) =head1 SEE ALSO diff --git a/dist/Data-Dumper/Dumper.xs b/dist/Data-Dumper/Dumper.xs index cf0717e435..c8e96cda74 100644 --- a/dist/Data-Dumper/Dumper.xs +++ b/dist/Data-Dumper/Dumper.xs @@ -703,11 +703,11 @@ DD_dump(pTHX_ SV *val, const char *name, STRLEN namelen, SV *retval, HV *seenhv, if (sortkeys) { char *key; svp = av_fetch(keys, i, FALSE); - keysv = svp ? *svp : sv_mortalcopy(&PL_sv_undef); + keysv = svp ? *svp : sv_newmortal(); key = SvPV(keysv, keylen); svp = hv_fetch((HV*)ival, key, SvUTF8(keysv) ? -(I32)keylen : (I32)keylen, 0); - hval = svp ? *svp : sv_mortalcopy(&PL_sv_undef); + hval = svp ? *svp : sv_newmortal(); } else { keysv = hv_iterkeysv(entry); |