MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / numusehash

Function numusehash

lib/lua/src/ltable.c:456–470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

454
455
456static int numusehash (const Table *t, unsigned int *nums, unsigned int *pna) {
457 int totaluse = 0; /* total number of elements */
458 int ause = 0; /* elements added to 'nums' (can go to array part) */
459 int i = sizenode(t);
460 while (i--) {
461 Node *n = &t->node[i];
462 if (!isempty(gval(n))) {
463 if (keyisinteger(n))
464 ause += countint(keyival(n), nums);
465 totaluse++;
466 }
467 }
468 *pna += ause;
469 return totaluse;
470}
471
472
473/*

Callers 1

rehashFunction · 0.85

Calls 1

countintFunction · 0.85

Tested by

no test coverage detected