MCPcopy Create free account
hub / github.com/Cubitect/cubiomes-viewer / countint

Function countint

lua/src/ltable.c:411–419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

numusehashFunction · 0.85
rehashFunction · 0.85

Calls 2

arrayindexFunction · 0.85
luaO_ceillog2Function · 0.85

Tested by

no test coverage detected