Pārlūkot izejas kodu

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

Daniel-Constantin Mierla 5 gadi atpakaļ
vecāks
revīzija
d4f8674d00
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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,