summaryrefslogtreecommitdiff
path: root/gv.h
diff options
context:
space:
mode:
Diffstat (limited to 'gv.h')
-rw-r--r--gv.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/gv.h b/gv.h
index 54722b7c75..c61f2e64a3 100644
--- a/gv.h
+++ b/gv.h
@@ -88,7 +88,17 @@ Return the SV from the GV.
#endif
#define GvREFCNT(gv) (GvGP(gv)->gp_refcnt)
-#define GvIO(gv) ((gv) && SvTYPE((const SV*)gv) == SVt_PVGV && GvGP(gv) ? GvIOp(gv) : NULL)
+#define GvIO(gv) \
+ ( \
+ (gv) \
+ && ( \
+ SvTYPE((const SV*)(gv)) == SVt_PVGV \
+ || SvTYPE((const SV*)(gv)) == SVt_PVLV \
+ ) \
+ && GvGP(gv) \
+ ? GvIOp(gv) \
+ : NULL \
+ )
#define GvIOp(gv) (GvGP(gv)->gp_io)
#define GvIOn(gv) (GvIO(gv) ? GvIOp(gv) : GvIOp(gv_IOadd(gv)))