This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Eliminate two more unneeded strlen()s from Dumper.xs
authorNicholas Clark <nick@ccl4.org>
Sat, 7 Oct 2006 16:08:04 +0000 (16:08 +0000)
committerNicholas Clark <nick@ccl4.org>
Sat, 7 Oct 2006 16:08:04 +0000 (16:08 +0000)
p4raw-id: //depot/perl@28959

ext/Data/Dumper/Dumper.xs

index e45550b..0fc7bbd 100644 (file)
@@ -360,7 +360,7 @@ DD_dump(pTHX_ SV *val, const char *name, STRLEN namelen, SV *retval, HV *seenhv,
                av_push(seenentry, namesv);
                (void)SvREFCNT_inc(val);
                av_push(seenentry, val);
                av_push(seenentry, namesv);
                (void)SvREFCNT_inc(val);
                av_push(seenentry, val);
-               (void)hv_store(seenhv, id, strlen(id),
+               (void)hv_store(seenhv, id, idlen,
                               newRV_inc((SV*)seenentry), 0);
                SvREFCNT_dec(seenentry);
            }
                               newRV_inc((SV*)seenentry), 0);
                SvREFCNT_dec(seenentry);
            }
@@ -786,7 +786,7 @@ DD_dump(pTHX_ SV *val, const char *name, STRLEN namelen, SV *retval, HV *seenhv,
                seenentry = newAV();
                av_push(seenentry, namesv);
                av_push(seenentry, newRV_inc(val));
                seenentry = newAV();
                av_push(seenentry, namesv);
                av_push(seenentry, newRV_inc(val));
-               (void)hv_store(seenhv, id, strlen(id), newRV_inc((SV*)seenentry), 0);
+               (void)hv_store(seenhv, id, idlen, newRV_inc((SV*)seenentry), 0);
                SvREFCNT_dec(seenentry);
            }
        }
                SvREFCNT_dec(seenentry);
            }
        }