diff options
author | Nicholas Clark <nick@ccl4.org> | 2009-10-12 16:06:20 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2009-10-12 16:06:20 +0100 |
commit | a2a5de9516c1b256b060768ac6dad252a3aa3be7 (patch) | |
tree | aeb1473ea930984671f646814f6a7a7802164960 /gv.c | |
parent | 5f5991a0d6d8ef99d2643b88a7d9285e35277331 (diff) | |
download | perl-a2a5de9516c1b256b060768ac6dad252a3aa3be7.tar.gz |
Add Perl_ck_warner(), which combines Perl_ckwarn() and Perl_warner().
Replace ckWARN{,2,3,4}() && Perl_warner() with it, which trades reduced code
size (about 0.2%), for 1 more function call if warnings are not enabled.
However, if we're now in the L1 or L2 cache when we weren't previously, that's
still going to be a speed win.
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 12 |
1 files changed, 5 insertions, 7 deletions
@@ -413,9 +413,8 @@ Perl_gv_fetchmeth(pTHX_ HV *stash, const char *name, STRLEN len, I32 level) cstash = gv_stashsv(linear_sv, 0); if (!cstash) { - if (ckWARN(WARN_SYNTAX)) - Perl_warner(aTHX_ packWARN(WARN_SYNTAX), "Can't locate package %"SVf" for @%s::ISA", - SVfARG(linear_sv), hvname); + Perl_ck_warner(aTHX_ packWARN(WARN_SYNTAX), "Can't locate package %"SVf" for @%s::ISA", + SVfARG(linear_sv), hvname); continue; } @@ -729,11 +728,10 @@ Perl_gv_autoload4(pTHX_ HV *stash, const char *name, STRLEN len, I32 method) * Inheriting AUTOLOAD for non-methods works ... for now. */ if (!method && (GvCVGEN(gv) || GvSTASH(gv) != stash) - && ckWARN2(WARN_DEPRECATED, WARN_SYNTAX) ) - Perl_warner(aTHX_ packWARN2(WARN_DEPRECATED, WARN_SYNTAX), - "Use of inherited AUTOLOAD for non-method %s::%.*s() is deprecated", - packname, (int)len, name); + Perl_ck_warner(aTHX_ packWARN2(WARN_DEPRECATED, WARN_SYNTAX), + "Use of inherited AUTOLOAD for non-method %s::%.*s() is deprecated", + packname, (int)len, name); if (CvISXSUB(cv)) { /* rather than lookup/init $AUTOLOAD here |