Explorar o código

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

Daniel-Constantin Mierla %!s(int64=5) %!d(string=hai) anos
pai
achega
d4f8674d00
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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,