summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2017-11-02 14:03:40 -0600
committerKarl Williamson <khw@cpan.org>2017-11-06 12:50:06 -0700
commit0f12654f40cf107e9bddf1bd2acf7f0e41068be5 (patch)
tree2b16729ca896219b0981d200bd252359382abebb /pp.c
parentbdb7e3f0f6e41516d2c50d43e5f3f1373db014b0 (diff)
downloadperl-0f12654f40cf107e9bddf1bd2acf7f0e41068be5.tar.gz
Change some strBEGINs() to memBEGINs()
The latter is generally faster when the length is already known. This commit also changes a few hard-coded numbers to use sizeof().
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp.c b/pp.c
index 30b84065db..130019f056 100644
--- a/pp.c
+++ b/pp.c
@@ -384,7 +384,7 @@ PP(pp_prototype)
if (SvGMAGICAL(TOPs)) SETs(sv_mortalcopy(TOPs));
if (SvPOK(TOPs) && SvCUR(TOPs) >= 7) {
const char * s = SvPVX_const(TOPs);
- if (strBEGINs(s, "CORE::")) {
+ if (memBEGINs(s, SvCUR(TOPs), "CORE::")) {
const int code = keyword(s + 6, SvCUR(TOPs) - 6, 1);
if (!code)
DIE(aTHX_ "Can't find an opnumber for \"%" UTF8f "\"",