* Move murmurhash to .pxd in strings file

This commit is contained in:
Matthew Honnibal 2014-12-20 07:41:08 +11:00
parent d5a942c4a4
commit 89a1cc1a48
2 changed files with 8 additions and 2 deletions

View File

@ -1,7 +1,14 @@
from cymem.cymem cimport Pool from cymem.cymem cimport Pool
from preshed.maps cimport PreshMap from preshed.maps cimport PreshMap
from murmurhash.mrmr cimport hash64
from .structs cimport Utf8Str from .structs cimport Utf8Str, UniStr
cdef inline void slice_unicode(UniStr* s, Py_UNICODE* chars, int start, int end) nogil:
s.chars = &chars[start]
s.n = end - start
s.key = hash64(s.chars, s.n * sizeof(Py_UNICODE), 0)
cdef class StringStore: cdef class StringStore:

View File

@ -2,7 +2,6 @@ import codecs
from libc.string cimport memcpy from libc.string cimport memcpy
from murmurhash.mrmr cimport hash64
from .typedefs cimport hash_t from .typedefs cimport hash_t