diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-12-04 19:36:51 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-12-04 19:36:51 +0000 |
commit | da58a35d3e499cdd492619302eb044ac1841788f (patch) | |
tree | 33aec77245e5242e960797d9a1f9e3be7c6382b9 /hv.h | |
parent | 38ff9fd43e4d2321f907bd54ac8e6791531cd9fc (diff) | |
download | perl-da58a35d3e499cdd492619302eb044ac1841788f.tar.gz |
UTF-8 hash keys, patch from Inaba Hiroto.
p4raw-id: //depot/perl@7980
Diffstat (limited to 'hv.h')
-rw-r--r-- | hv.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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) |