Browse Source

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

Daniel-Constantin Mierla 5 years ago
parent
commit
d4f8674d00
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/core/hashes.h

+ 1 - 1
src/core/hashes.h

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