X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=hv.h;h=369bf3c549836118830ac09f458ed55c7ae8ab3d;hb=917211f59b1d5210f3944956e717bae1a2ca7565;hp=d679e30a8beeda342a2d9d1acdade4c9866fb96b;hpb=dd2710a18cfd609d3bec8cdea7f5ef2e4cbaae10;p=p5sagit%2Fp5-mst-13.2.git diff --git a/hv.h b/hv.h index d679e30..369bf3c 100644 --- a/hv.h +++ b/hv.h @@ -1,6 +1,6 @@ /* hv.h * - * Copyright (c) 1991-2001, Larry Wall + * Copyright (c) 1991-2002, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -23,6 +23,8 @@ struct hek { U32 hek_hash; /* hash of key */ I32 hek_len; /* length of hash key */ char hek_key[1]; /* variable-length hash key */ + /* the hash-key is \0-terminated */ + /* after the \0 there is a byte telling whether the key is UTF8 */ }; /* hash structure: */ @@ -211,7 +213,7 @@ C. #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))) +#define HEK_UTF8(hek) (*(HEK_KEY(hek)+HEK_LEN(hek)+1)) /* calculate HV array allocation */ #if defined(STRANGE_MALLOC) || defined(MYMALLOC)