summaryrefslogtreecommitdiff
path: root/hv.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-05-27 09:18:26 +0000
committerNicholas Clark <nick@ccl4.org>2005-05-27 09:18:26 +0000
commit9b9d0b15bd9c5c0115200324ab9b04803069c7ce (patch)
treec511e92870e2a03c965812bc3304d8d554e7e1d4 /hv.h
parent62aa563719d028e176ee9e4eb16701b5a2193e4c (diff)
downloadperl-9b9d0b15bd9c5c0115200324ab9b04803069c7ce.tar.gz
Get the HEK once only in the hot code (class method calls)
p4raw-id: //depot/perl@24594
Diffstat (limited to 'hv.h')
-rw-r--r--hv.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/hv.h b/hv.h
index 12029cec70..c99d4790f7 100644
--- a/hv.h
+++ b/hv.h
@@ -227,6 +227,8 @@ C<SV*>.
#define HvNAME(hv) HvNAME_get(hv)
/* FIXME - all of these should use a UTF8 aware API, which should also involve
getting the length. */
+/* This macro may go away without notice. */
+#define HvNAME_HEK(hv) (((XPVHV *)SvANY(hv))->xhv_aux && (((struct xpvhv_aux *)((XPVHV *)SvANY(hv))->xhv_aux)->xhv_name) ? ((struct xpvhv_aux *)((XPVHV *)SvANY(hv))->xhv_aux)->xhv_name: 0)
#define HvNAME_get(hv) (((XPVHV *)SvANY(hv))->xhv_aux ? \
(((struct xpvhv_aux *)((XPVHV *)SvANY(hv))->xhv_aux)->xhv_name) ? HEK_KEY(((struct xpvhv_aux *)((XPVHV *)SvANY(hv))->xhv_aux)->xhv_name) : 0 : 0)
#define HvNAMELEN_get(hv) (((XPVHV *)SvANY(hv))->xhv_aux ? \