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

Function numusehash

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

Source from the content-addressed store, hash-verified

417
418
419static int numusehash(const Table *t, unsigned int *nums, unsigned int *pna) {
420 int totaluse = 0; /* total number of elements */
421 int ause = 0; /* elements added to 'nums' (can go to array part) */
422 int i = sizenode(t);
423 while (i--) {
424 Node *n = &t->node[i];
425 if (!ttisnil(gval(n))) {
426 ause += countint(gkey(n), nums);
427 totaluse++;
428 }
429 }
430 *pna += ause;
431 return totaluse;
432}
433
434
435static void setarrayvector(lua_State *L, Table *t, unsigned int size) {

Callers 1

rehashFunction · 0.85

Calls 1

countintFunction · 0.85

Tested by

no test coverage detected