summaryrefslogtreecommitdiff
path: root/hv.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-12-04 19:36:51 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-12-04 19:36:51 +0000
commit007750133f647ee8d50d3a701d7a4c0ba9fbab2f (patch)
tree33aec77245e5242e960797d9a1f9e3be7c6382b9 /hv.h
parentf4330496d5d91c7004842b92234e060d09c5e258 (diff)
downloadperl-007750133f647ee8d50d3a701d7a4c0ba9fbab2f.tar.gz
UTF-8 hash keys, patch from Inaba Hiroto.
p4raw-id: //depot/perl@7980
Diffstat (limited to 'hv.h')
-rw-r--r--hv.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/hv.h b/hv.h
index 08f3bed7d5..f8cf2b968f 100644
--- a/hv.h
+++ b/hv.h
@@ -151,6 +151,8 @@ C<SV*>.
#define HeKEY(he) HEK_KEY(HeKEY_hek(he))
#define HeKEY_sv(he) (*(SV**)HeKEY(he))
#define HeKLEN(he) HEK_LEN(HeKEY_hek(he))
+#define HeKUTF8(he) HEK_UTF8(HeKEY_hek(he))
+#define HeKLEN_UTF8(he) (HeKUTF8(he) ? -HeKLEN(he) : HeKLEN(he))
#define HeVAL(he) (he)->hent_val
#define HeHASH(he) HEK_HASH(HeKEY_hek(he))
#define HePV(he,lp) ((HeKLEN(he) == HEf_SVKEY) ? \
@@ -175,6 +177,7 @@ C<SV*>.
#define HEK_HASH(hek) (hek)->hek_hash
#define HEK_LEN(hek) (hek)->hek_len
#define HEK_KEY(hek) (hek)->hek_key
+#define HEK_UTF8(hek) (*(HEK_KEY(hek)+HEK_LEN(hek)))
/* calculate HV array allocation */
#if defined(STRANGE_MALLOC) || defined(MYMALLOC)