MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / countint

Function countint

extlibs/lua/src/ltable.c:369–377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

367
368
369static int countint (lua_Integer key, unsigned int *nums) {
370 unsigned int k = arrayindex(key);
371 if (k != 0) { /* is 'key' an appropriate array index? */
372 nums[luaO_ceillog2(k)]++; /* count as such */
373 return 1;
374 }
375 else
376 return 0;
377}
378
379
380/*

Callers 2

numusehashFunction · 0.85
rehashFunction · 0.85

Calls 2

arrayindexFunction · 0.85
luaO_ceillog2Function · 0.85

Tested by

no test coverage detected