diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-10-17 15:10:58 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-10-17 15:10:58 +0000 |
commit | d279ab826c469db5d93d3d728fdcf1acd9265665 (patch) | |
tree | addeb0185f58c60c5cfc3f8cecb80ea1c6b27088 /gv.c | |
parent | 7edb818e3f3ca1bd7fb46554919c8cfd222bd37d (diff) | |
download | perl-d279ab826c469db5d93d3d728fdcf1acd9265665.tar.gz |
Storing the length of all the overloading names saves a strlen() in a
loop in Perl_Gv_AMupdate().
Brought to you by the Campaign for the Elimination of strlen().
p4raw-id: //depot/perl@32124
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1586,7 +1586,7 @@ Perl_Gv_AMupdate(pTHX_ HV *stash) const char * const cooky = PL_AMG_names[i]; /* Human-readable form, for debugging: */ const char * const cp = (i >= DESTROY_amg ? cooky : AMG_id2name(i)); - const STRLEN l = strlen(cooky); + const STRLEN l = PL_AMG_namelens[i]; DEBUG_o( Perl_deb(aTHX_ "Checking overloading of \"%s\" in package \"%.256s\"\n", cp, HvNAME_get(stash)) ); |