summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-10-01 22:14:19 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-10-06 13:01:00 -0700
commit0eeb01b957d2d66eec1a0e1e347c6d8772e5284e (patch)
tree110f9778173d6a76d65b152c2344eb48f09bc692 /gv.c
parent0fe84f7c4203febe7385a57fe43af2ee032318cf (diff)
downloadperl-0eeb01b957d2d66eec1a0e1e347c6d8772e5284e.tar.gz
Remove method param from gv_autoload_*
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.
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c14
1 files changed, 8 insertions, 6 deletions
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",