Przeglądaj źródła

core: hashes - small helper macro to compute hash slot index

Daniel-Constantin Mierla 5 lat temu
rodzic
commit
d4f8674d00
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/core/hashes.h

+ 1 - 1
src/core/hashes.h

@@ -27,7 +27,7 @@
 
 
 #include "str.h"
 #include "str.h"
 
 
-
+#define core_hash_idx(hid, hsize) ((hid)&(hsize-1))
 
 
 /** internal use: hash update
 /** internal use: hash update
  * params: char* s   - string start,
  * params: char* s   - string start,