MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / numusehash

Function numusehash

Source/Misc/lua/src/lua.c:9487–9500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9485
9486
9487static int numusehash (const Table *t, int *nums, int *pnasize) {
9488int totaluse = 0; /* total number of elements */
9489int ause = 0; /* summation of `nums' */
9490int i = sizenode(t);
9491while (i--) {
9492Node *n = &t->node[i];
9493if (!ttisnil(gval(n))) {
9494ause += countint(key2tval(n), nums);
9495totaluse++;
9496}
9497}
9498*pnasize += ause;
9499return totaluse;
9500}
9501
9502
9503static void setarrayvector (lua_State *L, Table *t, int size) {

Callers 1

rehashFunction · 0.85

Calls 1

countintFunction · 0.85

Tested by

no test coverage detected