[Bf-blender-cvs] [6c13312] temp-ghash-experiments: Merge branch 'master' into temp-ghash-experiments
Bastien Montagne
noreply at git.blender.org
Fri Feb 20 12:46:24 CET 2015
Commit: 6c13312d79c4a53a95233fe3022dfff870b7eb8d
Author: Bastien Montagne
Date: Fri Feb 20 12:12:05 2015 +0100
Branches: temp-ghash-experiments
https://developer.blender.org/rB6c13312d79c4a53a95233fe3022dfff870b7eb8d
Merge branch 'master' into temp-ghash-experiments
===================================================================
===================================================================
diff --cc source/blender/blenlib/BLI_ghash.h
index 4c984a0,bf2b412..15aae5f
--- a/source/blender/blenlib/BLI_ghash.h
+++ b/source/blender/blenlib/BLI_ghash.h
@@@ -125,10 -124,9 +124,10 @@@ bool BLI_ghashutil_ptrcmp(co
unsigned int BLI_ghashutil_strhash_n(const char *key, size_t n);
#define BLI_ghashutil_strhash(key) ( \
- CHECK_TYPE_INLINE(key, char *), \
+ CHECK_TYPE_ANY(key, char *, const char *, const char * const), \
BLI_ghashutil_strhash_p(key))
unsigned int BLI_ghashutil_strhash_p(const void *key);
+unsigned int BLI_ghashutil_strhash_p_murmur(const void *key);
bool BLI_ghashutil_strcmp(const void *a, const void *b);
#define BLI_ghashutil_inthash(key) ( \
diff --cc source/blender/blenlib/intern/BLI_ghash.c
index f30d09d,5360ea7..4ca5395
--- a/source/blender/blenlib/intern/BLI_ghash.c
+++ b/source/blender/blenlib/intern/BLI_ghash.c
@@@ -796,15 -769,9 +797,15 @@@ unsigned int BLI_ghashutil_strhash_p(co
return h;
}
+unsigned int BLI_ghashutil_strhash_p_murmur(const void *ptr)
+{
+ const unsigned char *key = ptr;
+
+ return BLI_hash_mm2(key, strlen((const char *)key), 0);
+}
bool BLI_ghashutil_strcmp(const void *a, const void *b)
{
- return (strcmp(a, b) != 0);
+ return (!STREQ(a, b));
}
GHashPair *BLI_ghashutil_pairalloc(const void *first, const void *second)
More information about the Bf-blender-cvs
mailing list