Commits

Mikhail Korobov committed 2e366da

update Python extension to match the C library

Comments (0)

Files changed (3)

 from Cython.Distutils import build_ext
 
 HATTRIE_DIR = 'hat-trie/src'
-HATTRIE_FILE_NAMES = ['ahtable.c', 'hat-trie.c', 'misc.c', 'superfasthash.c']
+HATTRIE_FILE_NAMES = ['ahtable.c', 'hat-trie.c', 'misc.c', 'murmurhash3.c']
 HATTRIE_FILES = [os.path.join(HATTRIE_DIR, name) for name in HATTRIE_FILE_NAMES]
 
 setup(

src/chat_trie.pxd

     ctypedef struct hattrie_iter_t:
         pass
 
-    hattrie_iter_t* hattrie_iter_begin     (hattrie_t*)
+    hattrie_iter_t* hattrie_iter_begin     (hattrie_t*, bint sorted)
     void            hattrie_iter_next      (hattrie_iter_t*)
     bint            hattrie_iter_finished  (hattrie_iter_t*)
     void            hattrie_iter_free      (hattrie_iter_t*)
 
     def iterkeys(self):
         cdef:
-            hattrie_iter_t* it = hattrie_iter_begin(self._trie)
+            hattrie_iter_t* it = hattrie_iter_begin(self._trie, 0)
             char* c_key
             size_t val
             size_t length
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.