In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/551f9d97a74adb55882f5ce5672c5682fd80c0f6?hp=ea3ffa52d4da2260b940cb269b4e4f51ecd6bc7b>

- Log -----------------------------------------------------------------
commit 551f9d97a74adb55882f5ce5672c5682fd80c0f6
Author: Yves Orton <[email protected]>
Date:   Thu Nov 3 10:03:26 2016 +0100

    add a comment about the properties of struct hek
-----------------------------------------------------------------------

Summary of changes:
 hv.h | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/hv.h b/hv.h
index ee536f0..55dd475 100644
--- a/hv.h
+++ b/hv.h
@@ -43,12 +43,18 @@ struct he {
 
 /* hash key -- defined separately for use as shared pointer */
 struct hek {
-    U32                hek_hash;       /* hash of key */
-    I32                hek_len;        /* length of hash key */
-    char       hek_key[1];     /* variable-length hash key */
+    U32         hek_hash;        /* computed hash of key */
+    I32         hek_len;        /* length of the hash key */
+    /* Be careful! Sometimes we store a pointer in the hek_key
+     * buffer, which means it must be 8 byte aligned or things
+     * dont work on aligned platforms like HPUX
+     * Also beware, the last byte of the hek_key buffer is a
+     * hidden flags byte about the key. */
+     */
+     char       hek_key[1];        /* variable-length hash key */
     /* the hash-key is \0-terminated */
     /* after the \0 there is a byte for flags, such as whether the key
-       is UTF-8 */
+       is UTF-8 or WAS-UTF-8, or an SV */
 };
 
 struct shared_he {

--
Perl5 Master Repository

Reply via email to