prefix hash functions with uc_
fix prototype for hashuint
This commit is contained in:
+1
-1
@@ -29,7 +29,7 @@ uint32_t
|
|||||||
uc_pjwhash(const char *str,size_t len);
|
uc_pjwhash(const char *str,size_t len);
|
||||||
|
|
||||||
uint32_t
|
uint32_t
|
||||||
sax_hash(void *key, size_t len);
|
uc_sax_hash(void *key, size_t len);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
#include "ucore_hash.h"
|
#include "ucore_hash.h"
|
||||||
|
|
||||||
uint32_t
|
uint32_t
|
||||||
uc_hashint(uint32_t a)
|
uc_hashuint(uint32_t a)
|
||||||
{
|
{
|
||||||
a = (a ^ 61) ^ (a >> 16);
|
a = (a ^ 61) ^ (a >> 16);
|
||||||
a = a + (a << 3);
|
a = a + (a << 3);
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
#include "ucore_hash.h"
|
#include "ucore_hash.h"
|
||||||
|
|
||||||
uint32_t
|
uint32_t
|
||||||
sax_hash(void *key, size_t len)
|
uc_sax_hash(void *key, size_t len)
|
||||||
{
|
{
|
||||||
unsigned char *p = key;
|
unsigned char *p = key;
|
||||||
unsigned h = 0;
|
unsigned h = 0;
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
unsigned long
|
unsigned long
|
||||||
sdbmhash(const unsigned char *str)
|
uc_sdbmhash(const unsigned char *str)
|
||||||
{
|
{
|
||||||
unsigned long hash = 0;
|
unsigned long hash = 0;
|
||||||
unsigned int c;
|
unsigned int c;
|
||||||
|
|||||||
Reference in New Issue
Block a user