MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / countint

Function countint

lua/ltable.c:245–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243
244
245static int countint (const TValue *key, int *nums) {
246 int k = arrayindex(key);
247 if (0 < k && k <= MAXASIZE) { /* is `key' an appropriate array index? */
248 nums[ceillog2(k)]++; /* count as such */
249 return 1;
250 }
251 else
252 return 0;
253}
254
255
256static 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