MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / countint

Function countint

third-party/lua-5.2.4/src/ltable.c:218–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216
217
218static int countint (const TValue *key, int *nums) {
219 int k = arrayindex(key);
220 if (0 < k && k <= MAXASIZE) { /* is `key' an appropriate array index? */
221 nums[luaO_ceillog2(k)]++; /* count as such */
222 return 1;
223 }
224 else
225 return 0;
226}
227
228
229static int numusearray (const Table *t, int *nums) {

Callers 2

numusehashFunction · 0.70
rehashFunction · 0.70

Calls 2

arrayindexFunction · 0.70
luaO_ceillog2Function · 0.70

Tested by

no test coverage detected