X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=hv.h;h=bd157f8b11103ca0c8bc67d18884b1b7bbeaffe1;hb=b2a156bd8e464af88881c77344280160fd844dcf;hp=9e31335228c96dfd1cb6fc4d226f4f363f21bae8;hpb=b6bbf3fa3e9accb3710d8c05e0e3b107baaa1fee;p=p5sagit%2Fp5-mst-13.2.git diff --git a/hv.h b/hv.h index 9e31335..bd157f8 100644 --- a/hv.h +++ b/hv.h @@ -323,6 +323,7 @@ C. #define HVhek_UTF8 0x01 /* Key is utf8 encoded. */ #define HVhek_WASUTF8 0x02 /* Key is bytes here, but was supplied as utf8. */ #define HVhek_REHASH 0x04 /* This key is in an hv using a custom HASH . */ +#define HVhek_UNSHARED 0x08 /* This key isn't a shared hash key. */ #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) */ @@ -333,10 +334,11 @@ C. into all keys as hv_iternext has no access to the hash flags. At this point Storable's tests get upset, because sometimes hashes are "keyed" and sometimes not, depending on the order of data insertion, and whether - it triggered rehashing. So currently HVhek_REHAS is exempt. + it triggered rehashing. So currently HVhek_REHASH is exempt. + Similarly UNSHARED */ -#define HVhek_ENABLEHVKFLAGS (HVhek_MASK - HVhek_REHASH) +#define HVhek_ENABLEHVKFLAGS (HVhek_MASK & ~(HVhek_REHASH|HVhek_UNSHARED)) #define HEK_UTF8(hek) (HEK_FLAGS(hek) & HVhek_UTF8) #define HEK_UTF8_on(hek) (HEK_FLAGS(hek) |= HVhek_UTF8)