MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / numusehash

Function numusehash

third-party/lua-5.2.4/src/ltable.c:254–267  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252
253
254static int numusehash (const Table *t, int *nums, int *pnasize) {
255 int totaluse = 0; /* total number of elements */
256 int ause = 0; /* summation of `nums' */
257 int i = sizenode(t);
258 while (i--) {
259 Node *n = &t->node[i];
260 if (!ttisnil(gval(n))) {
261 ause += countint(gkey(n), nums);
262 totaluse++;
263 }
264 }
265 *pnasize += ause;
266 return totaluse;
267}
268
269
270static void setarrayvector (lua_State *L, Table *t, int size) {

Callers 1

rehashFunction · 0.70

Calls 1

countintFunction · 0.70

Tested by

no test coverage detected