Commit 8e1f12e2 authored by Shane Snyder's avatar Shane Snyder

switch to uthash hash fn instead of lookup3

parent 0e353a46
......@@ -2,4 +2,6 @@ src_libssg_la_SOURCES += \
src/ssg-internal.h \
src/ssg.c \
src/ssg-rpc.c \
src/lookup3.c
src/utarray.h \
src/utlist.h \
src/uthash.h
This diff is collapsed.
......@@ -130,15 +130,11 @@ typedef struct ssg_member_update
/* SSG internal function prototypes */
#define ssg_hashlittle2 hashlittle2
extern void hashlittle2(const void *key, size_t length, uint32_t *pc, uint32_t *pb);
static inline uint64_t ssg_hash64_str(const char * str)
{
uint32_t lower = 0, upper = 0;
uint64_t hash;
ssg_hashlittle2(str, strlen(str), &lower, &upper);
hash = lower + (((uint64_t)upper)<<32);
return hash;
unsigned hash;
HASH_JEN(str, strlen(str), hash);
return (uint64_t)hash;
}
void ssg_register_rpcs(
......
src_libssg_la_SOURCES += \
src/swim-fd/swim-fd.h \
src/swim-fd/swim-fd-internal.h \
src/swim-fd/utlist.h \
src/swim-fd/swim-fd.c \
src/swim-fd/swim-fd-ping.c
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment