MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / numusehash

Function numusehash

extlibs/lua/src/ltable.c:412–426  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

410
411
412static int numusehash (const Table *t, unsigned int *nums, unsigned int *pna) {
413 int totaluse = 0; /* total number of elements */
414 int ause = 0; /* elements added to 'nums' (can go to array part) */
415 int i = sizenode(t);
416 while (i--) {
417 Node *n = &t->node[i];
418 if (!isempty(gval(n))) {
419 if (keyisinteger(n))
420 ause += countint(keyival(n), nums);
421 totaluse++;
422 }
423 }
424 *pna += ause;
425 return totaluse;
426}
427
428
429/*

Callers 1

rehashFunction · 0.85

Calls 1

countintFunction · 0.85

Tested by

no test coverage detected