diff options
author | Nicholas Clark <nick@ccl4.org> | 2004-12-03 18:26:43 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2004-12-03 18:26:43 +0000 |
commit | 70ec62655df91a127fc208eb77497a9be5917f1b (patch) | |
tree | 5020014913ad4db9d3e38e3cde63b6a5ac33fd18 /gv.c | |
parent | ef97f5b30528a5e4790713361751c0a1bbd94c48 (diff) | |
download | perl-70ec62655df91a127fc208eb77497a9be5917f1b.tar.gz |
There are clearer ways of saying m/^[ab]$/ than strchr("ab", c)
They seem to produce slightly smaller object code too.
p4raw-id: //depot/perl@23604
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -740,7 +740,8 @@ Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, I32 sv_type) sv_type != SVt_PVGV && sv_type != SVt_PVFM && sv_type != SVt_PVIO && - !(len == 1 && sv_type == SVt_PV && strchr("ab",*name)) ) + !(len == 1 && sv_type == SVt_PV && + (*name == 'a' || *name == 'b')) ) { gvp = (GV**)hv_fetch(stash,name,len,0); if (!gvp || |