diff options
author | David Mitchell <davem@iabyn.com> | 2016-11-13 14:59:32 +0000 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2016-11-13 15:27:34 +0000 |
commit | 4e8879f34cd1f40280a3be7b04ebda760dcaf0f2 (patch) | |
tree | 159b5857e71a950b6ef5ff46903e6b68e994cf26 /gv.h | |
parent | 5741d7e61dd47767bf5a0fde98f3fe94c6b2f2bb (diff) | |
download | perl-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.h | 1 |
1 files changed, 0 insertions, 1 deletions
@@ -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)); }) |