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

Function numusehash

third-party/lua-5.1.5/src/ltable.c:247–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245
246
247static int numusehash (const Table *t, int *nums, int *pnasize) {
248 int totaluse = 0; /* total number of elements */
249 int ause = 0; /* summation of `nums' */
250 int i = sizenode(t);
251 while (i--) {
252 Node *n = &t->node[i];
253 if (!ttisnil(gval(n))) {
254 ause += countint(key2tval(n), nums);
255 totaluse++;
256 }
257 }
258 *pnasize += ause;
259 return totaluse;
260}
261
262
263static 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