MCPcopy Create free account
hub / github.com/F-Stack/f-stack / hashnum

Function hashnum

freebsd/contrib/openzfs/module/lua/ltable.c:80–89  ·  view source on GitHub ↗

** hash for lua_Numbers */

Source from the content-addressed store, hash-verified

78** hash for lua_Numbers
79*/
80static Node *hashnum (const Table *t, lua_Number n) {
81 int i;
82 luai_hashnum(i, n);
83 if (i < 0) {
84 if (cast(unsigned int, i) == 0u - i) /* use unsigned to avoid overflows */
85 i = 0; /* handle INT_MIN */
86 i = -i; /* must be a positive value */
87 }
88 return hashmod(t, i);
89}
90
91
92

Callers 2

mainpositionFunction · 0.70
luaH_getintFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected