diff options
author | Nicholas Clark <nick@ccl4.org> | 2008-04-16 10:59:28 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-04-16 10:59:28 +0000 |
commit | 7edbdc6bb49f5970d9a4f23864d7626f8390de5c (patch) | |
tree | 2060348171474f6429832446ae99407acd07d925 /gv.c | |
parent | cc93af5fbd42046d3d6e19c3655b76edf6980b42 (diff) | |
download | perl-7edbdc6bb49f5970d9a4f23864d7626f8390de5c.tar.gz |
Using memEQ() rather than strnEQ() when the length is known feels
cleaner.
p4raw-id: //depot/perl@33696
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -520,7 +520,7 @@ Perl_gv_fetchmeth_autoload(pTHX_ HV *stash, const char *name, STRLEN len, I32 le if (!stash) return NULL; /* UNIVERSAL::AUTOLOAD could cause trouble */ - if (len == S_autolen && strnEQ(name, S_autoload, S_autolen)) + if (len == S_autolen && memEQ(name, S_autoload, S_autolen)) return NULL; if (!(gv = gv_fetchmeth(stash, S_autoload, S_autolen, FALSE))) return NULL; @@ -635,7 +635,7 @@ Perl_gv_fetchmethod_autoload(pTHX_ HV *stash, const char *name, I32 autoload) name = nsplit + 1; if (*nsplit == ':') --nsplit; - if ((nsplit - origname) == 5 && strnEQ(origname, "SUPER", 5)) { + if ((nsplit - origname) == 5 && memEQ(origname, "SUPER", 5)) { /* ->SUPER::method should really be looked up in original stash */ SV * const tmpstr = sv_2mortal(Perl_newSVpvf(aTHX_ "%s::SUPER", CopSTASHPV(PL_curcop))); @@ -702,7 +702,7 @@ Perl_gv_autoload4(pTHX_ HV *stash, const char *name, STRLEN len, I32 method) PERL_ARGS_ASSERT_GV_AUTOLOAD4; - if (len == S_autolen && strnEQ(name, S_autoload, S_autolen)) + if (len == S_autolen && memEQ(name, S_autoload, S_autolen)) return NULL; if (stash) { if (SvTYPE(stash) < SVt_PVHV) { |