summaryrefslogtreecommitdiff
path: root/gv.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2016-11-13 14:59:32 +0000
committerDavid Mitchell <davem@iabyn.com>2016-11-13 15:27:34 +0000
commit4e8879f34cd1f40280a3be7b04ebda760dcaf0f2 (patch)
tree159b5857e71a950b6ef5ff46903e6b68e994cf26 /gv.h
parent5741d7e61dd47767bf5a0fde98f3fe94c6b2f2bb (diff)
downloadperl-4e8879f34cd1f40280a3be7b04ebda760dcaf0f2.tar.gz
reduce cost of SvVALID()
Now that SvVALID() no longer just checks an SV flag, but instead checks for the existence of a certain type of magic, avoid using this more expensive macro when its not really needed. Also, and an extra flag test to SvVALID() to make it fail quicker.
Diffstat (limited to 'gv.h')
-rw-r--r--gv.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/gv.h b/gv.h
index 0b08b686f7..488f2cc87f 100644
--- a/gv.h
+++ b/gv.h
@@ -52,7 +52,6 @@ struct gp {
(*({ GV * const _gvname_hek = (GV *) (gv); \
assert(isGV_with_GP(_gvname_hek)); \
assert(SvTYPE(_gvname_hek) == SVt_PVGV || SvTYPE(_gvname_hek) >= SVt_PVLV); \
- assert(!SvVALID((SV*)_gvname_hek)); \
&(GvXPVGV(_gvname_hek)->xiv_u.xivu_namehek); \
}))
# define GvNAME_get(gv) ({ assert(GvNAME_HEK(gv)); (char *)HEK_KEY(GvNAME_HEK(gv)); })