summaryrefslogtreecommitdiff
path: root/hv.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-12-28 13:06:42 +0000
committerNicholas Clark <nick@ccl4.org>2008-12-28 13:06:42 +0000
commit44b87b5061968d098b3906ca4b5e6f94469c8694 (patch)
tree26dc3bef2d40170577a915a2d8e0b4aa4559dcf8 /hv.h
parent90acdc2acfdb8c512ef84ee08df225ccf527f635 (diff)
downloadperl-44b87b5061968d098b3906ca4b5e6f94469c8694.tar.gz
Add a key flag HVhek_KEYCANONICAL for Perl_hv_common(), which signals that the
key is in canonical form - any key passed encoded in UTF-8 cannot be represented as bytes, hence the downgrade check can be skipped. Use this internally for shared hash key scalars, as they are always canonical.
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 226532661d..9322377f2d 100644
--- a/hv.h
+++ b/hv.h
@@ -367,6 +367,9 @@ C<SV*>.
#define HVhek_FREEKEY 0x100 /* Internal flag to say key is malloc()ed. */
#define HVhek_PLACEHOLD 0x200 /* Internal flag to create placeholder.
* (may change, but Storable is a core module) */
+#define HVhek_KEYCANONICAL 0x400 /* Internal flag - key is in canonical form.
+ If the string is UTF-8, it cannot be
+ converted to bytes. */
#define HVhek_MASK 0xFF
/* Which flags enable HvHASKFLAGS? Somewhat a hack on a hack, as