MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / countint

Function countint

lib/lua/src/ltable.c:413–421  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

411
412
413static int countint (lua_Integer key, unsigned int *nums) {
414 unsigned int k = arrayindex(key);
415 if (k != 0) { /* is 'key' an appropriate array index? */
416 nums[luaO_ceillog2(k)]++; /* count as such */
417 return 1;
418 }
419 else
420 return 0;
421}
422
423
424/*

Callers 2

numusehashFunction · 0.85
rehashFunction · 0.85

Calls 2

arrayindexFunction · 0.85
luaO_ceillog2Function · 0.85

Tested by

no test coverage detected