浏览代码

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

Daniel-Constantin Mierla 5 年之前
父节点
当前提交
d4f8674d00
共有 1 个文件被更改,包括 1 次插入1 次删除
  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,