Use of m_core_hash for m_string_hash
(avoid duplication of code).
This commit is contained in:
1 parent
e9a75ca608
commit
0085b0df8d
1 file changed
+1
-8
+1
-8
@@ -571,14 +571,7 @@ static inline size_t
|
|||||||
string_hash(const string_t v)
|
string_hash(const string_t v)
|
||||||
{
|
{
|
||||||
STRING_CONTRACT (v);
|
STRING_CONTRACT (v);
|
||||||
const char *p = string_get_cstr(v);
|
return m_core_hash(v->ptr, v->size);
|
||||||
M_HASH_DECL(hash);
|
|
||||||
char c;
|
|
||||||
do {
|
|
||||||
c = *p++;
|
|
||||||
M_HASH_UP(hash, M_ASSIGN_CAST(unsigned int,c));
|
|
||||||
} while (c != 0);
|
|
||||||
return hash;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
|
|||||||
Reference in new issue
Block a user