summaryrefslogtreecommitdiff
path: root/hv.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-03-22 04:07:13 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-03-22 04:07:13 +0000
commit574c8022b1fdc7312bf9a5af037c8f777b60b6db (patch)
tree06b4317b44c20a0a8683822193a3359385f3c9bf /hv.h
parent3fbcfac442ddabdaab668242ba16ca26c5edd56c (diff)
downloadperl-574c8022b1fdc7312bf9a5af037c8f777b60b6db.tar.gz
If Unicode keys are entered to a hash, a bit is turned on.
If the bit is on, when the keys are fetched from the hash (%h, each %h, keys %h), the Unicodified versions of the keys are returned if needed. This solution errs on the size of over-Unicodifying, the old solution erred on the side of under-Unicodifying. As long as the hash keys can be a mix of byte and Unicode strings, a perfect fit is hard to come by. p4raw-id: //depot/perl@15407
Diffstat (limited to 'hv.h')
-rw-r--r--hv.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/hv.h b/hv.h
index 369bf3c549..3d5107500f 100644
--- a/hv.h
+++ b/hv.h
@@ -159,11 +159,14 @@ C<SV*>.
#define HvTOTALKEYS(hv) XHvTOTALKEYS((XPVHV*) SvANY(hv))
#define HvPLACEHOLDERS(hv) XHvPLACEHOLDERS((XPVHV*) SvANY(hv))
-
#define HvSHAREKEYS(hv) (SvFLAGS(hv) & SVphv_SHAREKEYS)
#define HvSHAREKEYS_on(hv) (SvFLAGS(hv) |= SVphv_SHAREKEYS)
#define HvSHAREKEYS_off(hv) (SvFLAGS(hv) &= ~SVphv_SHAREKEYS)
+#define HvUTF8KEYS(hv) (SvFLAGS(hv) & SVphv_UTF8KEYS)
+#define HvUTF8KEYS_on(hv) (SvFLAGS(hv) |= SVphv_UTF8KEYS)
+#define HvUTF8KEYS_off(hv) (SvFLAGS(hv) &= ~SVphv_UTF8KEYS)
+
#define HvLAZYDEL(hv) (SvFLAGS(hv) & SVphv_LAZYDEL)
#define HvLAZYDEL_on(hv) (SvFLAGS(hv) |= SVphv_LAZYDEL)
#define HvLAZYDEL_off(hv) (SvFLAGS(hv) &= ~SVphv_LAZYDEL)