MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / countint

Function countint

3rd/lua-5.4.3/src/ltable.c:402–410  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

400
401
402static int countint (lua_Integer key, unsigned int *nums) {
403 unsigned int k = arrayindex(key);
404 if (k != 0) { /* is 'key' an appropriate array index? */
405 nums[luaO_ceillog2(k)]++; /* count as such */
406 return 1;
407 }
408 else
409 return 0;
410}
411
412
413/*

Callers 2

numusehashFunction · 0.85
rehashFunction · 0.85

Calls 2

arrayindexFunction · 0.85
luaO_ceillog2Function · 0.85

Tested by

no test coverage detected