MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / countint

Function countint

src/Chain/libraries/glua/ltable.cpp:377–385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375
376
377static int countint(const TValue *key, unsigned int *nums) {
378 unsigned int k = arrayindex(key);
379 if (k != 0) { /* is 'key' an appropriate array index? */
380 nums[luaO_ceillog2(k)]++; /* count as such */
381 return 1;
382 }
383 else
384 return 0;
385}
386
387
388/*

Callers 2

numusehashFunction · 0.85
rehashFunction · 0.85

Calls 2

arrayindexFunction · 0.85
luaO_ceillog2Function · 0.85

Tested by

no test coverage detected