MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / countint

Function countint

Source/Misc/lua/src/lua.c:9451–9459  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9449
9450
9451static int countint (const TValue *key, int *nums) {
9452int k = arrayindex(key);
9453if (0 < k && k <= MAXASIZE) { /* is `key' an appropriate array index? */
9454nums[ceillog2(k)]++; /* count as such */
9455return 1;
9456}
9457else
9458return 0;
9459}
9460
9461
9462static int numusearray (const Table *t, int *nums) {

Callers 2

numusehashFunction · 0.85
rehashFunction · 0.85

Calls 1

arrayindexFunction · 0.85

Tested by

no test coverage detected