diff options
author | Karl Williamson <khw@cpan.org> | 2017-11-02 14:03:40 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2017-11-06 12:50:06 -0700 |
commit | 0f12654f40cf107e9bddf1bd2acf7f0e41068be5 (patch) | |
tree | 2b16729ca896219b0981d200bd252359382abebb /pp.c | |
parent | bdb7e3f0f6e41516d2c50d43e5f3f1373db014b0 (diff) | |
download | perl-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 "\"", |