summaryrefslogtreecommitdiff
path: root/gv.h
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.h
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.h')
-rw-r--r--gv.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/gv.h b/gv.h
index 4ca5be1fc4..2b6941a329 100644
--- a/gv.h
+++ b/gv.h
@@ -222,8 +222,12 @@ Return the SV from the GV.
#define GV_NO_SVGMAGIC 0x800 /* Skip get-magic on an SV argument;
used only by gv_fetchsv(_nomg) */
+/* Flags for gv_autoload_*/
+#define GV_AUTOLOAD_ISMETHOD 1 /* autoloading a method? */
+
/* SVf_UTF8 (more accurately the return value from SvUTF8) is also valid
- as a flag to gv_fetch_pvn_flags, so ensure it lies outside this range.
+ as a flag to gv_fetchpvn_flags and gv_autoload_*, so ensure it lies
+ outside this range.
*/
#define GV_NOADD_MASK \
@@ -240,7 +244,8 @@ Return the SV from the GV.
#define gv_fetchmeth(stash,name,len,level) gv_fetchmeth_pvn(stash, name, len, level, 0)
#define gv_fetchmeth_autoload(stash,name,len,level) gv_fetchmeth_pvn_autoload(stash, name, len, level, 0)
#define gv_fetchmethod_flags(stash,name,flags) gv_fetchmethod_pv_flags(stash, name, flags)
-#define gv_autoload4(stash, name, len, method) gv_autoload_pvn(stash, name, len, method, 0)
+#define gv_autoload4(stash, name, len, method) \
+ gv_autoload_pvn(stash, name, len, !!(method))
#define gv_AVadd(gv) gv_add_by_type((gv), SVt_PVAV)
#define gv_HVadd(gv) gv_add_by_type((gv), SVt_PVHV)