summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-06-11 17:00:52 +0000
committerNicholas Clark <nick@ccl4.org>2005-06-11 17:00:52 +0000
commitbdd68bc304bfb15597167600a71a074fd0478307 (patch)
tree4acee4c835cb34303273ea7ad0c3497962187aaf /sv.h
parent50adf7d25d4fa2ebde52a8067c5d9b35f5c7c054 (diff)
downloadperl-bdd68bc304bfb15597167600a71a074fd0478307.tar.gz
Shrink shared hash scalars from PVIV to PV
p4raw-id: //depot/perl@24802
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sv.h b/sv.h
index 4f35cd4222..01a98be32d 100644
--- a/sv.h
+++ b/sv.h
@@ -1348,7 +1348,9 @@ Like C<sv_catsv> but doesn't process magic.
(SVf_FAKE | SVf_READONLY))
#define SvIsCOW_shared_hash(sv) (SvIsCOW(sv) && SvLEN(sv) == 0)
-#define SvSHARED_HASH(sv) SvUVX(sv)
+#define SvSHARED_HEK_FROM_PV(pvx) \
+ ((struct hek*)(pvx - STRUCT_OFFSET(struct hek, hek_key)))
+#define SvSHARED_HASH(sv) (SvSHARED_HEK_FROM_PV(SvPVX_const(sv))->hek_hash)
/* flag values for sv_*_flags functions */
#define SV_IMMEDIATE_UNREF 1