MCPcopy Create free account
hub / github.com/DFHack/dfhack / countint

Function countint

depends/lua/src/ltable.c:243–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

241
242
243static int countint (const TValue *key, unsigned int *nums) {
244 unsigned int k = arrayindex(key);
245 if (k != 0) { /* is 'key' an appropriate array index? */
246 nums[luaO_ceillog2(k)]++; /* count as such */
247 return 1;
248 }
249 else
250 return 0;
251}
252
253
254/*

Callers 2

numusehashFunction · 0.85
rehashFunction · 0.85

Calls 2

arrayindexFunction · 0.85
luaO_ceillog2Function · 0.85

Tested by

no test coverage detected