Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 22 lines (19 sloc) 0.539 kb
1a07065 Refactor: moved the hash function from assoc.c to hash.c
Trond Norbye authored
1 /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2
05ca809 @dormando Make hash table algorithm selectable
dormando authored
3 #include "memcached.h"
4 #include "jenkins_hash.h"
5 #include "murmur3_hash.h"
6
7 int hash_init(enum hashfunc_type type) {
8 switch(type) {
9 case JENKINS_HASH:
10 hash = jenkins_hash;
11 settings.hash_algorithm = "jenkins";
12 break;
13 case MURMUR3_HASH:
14 hash = MurmurHash3_x86_32;
15 settings.hash_algorithm = "murmur3";
16 break;
17 default:
18 return -1;
19 }
20 return 0;
1a07065 Refactor: moved the hash function from assoc.c to hash.c
Trond Norbye authored
21 }
Something went wrong with that request. Please try again.