In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/bdf6ae426d6ae070fc7ae8b962dfd48388954b16?hp=d424882cc3537598b5c65fc8a4426bf49da5d903>

- Log -----------------------------------------------------------------
commit bdf6ae426d6ae070fc7ae8b962dfd48388954b16
Author: Steffen Mueller <[email protected]>
Date:   Thu Aug 2 20:24:40 2012 +0200

    Data::Dumper: Comment on previous optimization
    
    The optimization in the previous commit to Data::Dumper (sparse seen
    hash) is not complete: It is so far only applied to non-RV SVs. This
    also means that it's safe not to check for weak-refs. Applying the
    optimization to RVs should be possible, but is not as easy (I think).
-----------------------------------------------------------------------

Summary of changes:
 dist/Data-Dumper/Dumper.xs |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dist/Data-Dumper/Dumper.xs b/dist/Data-Dumper/Dumper.xs
index b382000..71b34ca 100644
--- a/dist/Data-Dumper/Dumper.xs
+++ b/dist/Data-Dumper/Dumper.xs
@@ -888,7 +888,9 @@ DD_dump(pTHX_ SV *val, const char *name, STRLEN namelen, SV 
*retval, HV *seenhv,
              * (IOW, the user does not expect it to contain everything
              * after the dump, then only store in seen hash if the SV
              * ref count is larger than 1. If it's 1, then we know that
-             * there is no other reference, duh. This is an optimization. */
+             * there is no other reference, duh. This is an optimization.
+             * Note that we'd have to check for weak-refs, too, but this is
+             * already the branch for non-refs only. */
            else if (val != &PL_sv_undef && (!use_sparse_seen_hash || 
SvREFCNT(val) > 1)) {
                SV * const namesv = newSVpvn("\\", 1);
                sv_catpvn(namesv, name, namelen);

--
Perl5 Master Repository

Reply via email to