We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a45dbab + 1183a63 commit 91a4a93Copy full SHA for 91a4a93
setup.py
@@ -35,7 +35,7 @@
35
'test': tests_require,
36
'redis': ['redis>=2.10.5', 'jsonpickle>=0.9.3'],
37
'uwsgi': ['uwsgi>=2.0.0', 'jsonpickle>=0.9.3'],
38
- 'cpphash': ['splitmmh3']
+ 'cpphash': ['mmh3cffi']
39
},
40
setup_requires=['nose'],
41
classifiers=[
splitio/hashfns/__init__.py
@@ -11,12 +11,10 @@
11
12
try:
13
# First attempt to import module with C++ core (faster)
14
- import mmh3
15
- from ctypes import c_uint
+ import mmh3cffi
16
17
def _murmur_hash(key, seed):
18
- ukey = key.encode('utf8')
19
- return c_uint(mmh3.hash(ukey, seed)).value
+ return mmh3cffi.hash_str(key, seed)
20
except:
21
# Fallback to interpreted python hash algoritm (slower)
22
from splitio.hashfns import murmur3py
0 commit comments