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

Function countint

engine/lua/src/lua/ltable.c:211–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209
210
211static int countint (const TValue *key, int *nums) {
212 int k = arrayindex(key);
213 if (0 < k && k <= MAXASIZE) { /* is `key' an appropriate array index? */
214 nums[ceillog2(k)]++; /* count as such */
215 return 1;
216 }
217 else
218 return 0;
219}
220
221
222static 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