MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / numusehash

Function numusehash

3rd/lua-5.4.3/src/ltable.c:445–459  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443
444
445static int numusehash (const Table *t, unsigned int *nums, unsigned int *pna) {
446 int totaluse = 0; /* total number of elements */
447 int ause = 0; /* elements added to 'nums' (can go to array part) */
448 int i = sizenode(t);
449 while (i--) {
450 Node *n = &t->node[i];
451 if (!isempty(gval(n))) {
452 if (keyisinteger(n))
453 ause += countint(keyival(n), nums);
454 totaluse++;
455 }
456 }
457 *pna += ause;
458 return totaluse;
459}
460
461
462/*

Callers 1

rehashFunction · 0.85

Calls 1

countintFunction · 0.85

Tested by

no test coverage detected