From 0eeb01b957d2d66eec1a0e1e347c6d8772e5284e Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Sat, 1 Oct 2011 22:14:19 -0700 Subject: Remove method param from gv_autoload_* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit method is a boolean flag (typed I32, but used as a boolean) added by commit 54310121b442. These new gv_autoload_* functions have a flags parameter, so there’s no reason for this extra effective bool. We can just use a flag bit. --- gv.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'gv.c') diff --git a/gv.c b/gv.c index 81326d5e6d..e363a4c449 100644 --- a/gv.c +++ b/gv.c @@ -1079,7 +1079,7 @@ Perl_gv_fetchmethod_pvn_flags(pTHX_ HV *stash, const char *name, const STRLEN le } GV* -Perl_gv_autoload_sv(pTHX_ HV *stash, SV* namesv, I32 method, U32 flags) +Perl_gv_autoload_sv(pTHX_ HV *stash, SV* namesv, U32 flags) { char *namepv; STRLEN namelen; @@ -1087,18 +1087,18 @@ Perl_gv_autoload_sv(pTHX_ HV *stash, SV* namesv, I32 method, U32 flags) namepv = SvPV(namesv, namelen); if (SvUTF8(namesv)) flags |= SVf_UTF8; - return gv_autoload_pvn(stash, namepv, namelen, method, flags); + return gv_autoload_pvn(stash, namepv, namelen, flags); } GV* -Perl_gv_autoload_pv(pTHX_ HV *stash, const char *namepv, I32 method, U32 flags) +Perl_gv_autoload_pv(pTHX_ HV *stash, const char *namepv, U32 flags) { PERL_ARGS_ASSERT_GV_AUTOLOAD_PV; - return gv_autoload_pvn(stash, namepv, strlen(namepv), method, flags); + return gv_autoload_pvn(stash, namepv, strlen(namepv), flags); } GV* -Perl_gv_autoload_pvn(pTHX_ HV *stash, const char *name, STRLEN len, I32 method, U32 flags) +Perl_gv_autoload_pvn(pTHX_ HV *stash, const char *name, STRLEN len, U32 flags) { dVAR; GV* gv; @@ -1133,7 +1133,9 @@ Perl_gv_autoload_pvn(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) + if ( + !(flags & GV_AUTOLOAD_ISMETHOD) + && (GvCVGEN(gv) || GvSTASH(gv) != stash) ) Perl_ck_warner_d(aTHX_ packWARN(WARN_DEPRECATED), "Use of inherited AUTOLOAD for non-method %s::%.*s() is deprecated", -- cgit v1.2.1