MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / luaH_new

Function luaH_new

deps/lua/src/ltable.c:358–371  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356
357
358Table *luaH_new (lua_State *L, int narray, int nhash) {
359 Table *t = luaM_new(L, Table);
360 luaC_link(L, obj2gco(t), LUA_TTABLE);
361 t->metatable = NULL;
362 t->flags = cast_byte(~0);
363 /* temporary values (kept only if some malloc fails) */
364 t->array = NULL;
365 t->sizearray = 0;
366 t->lsizenode = 0;
367 t->node = cast(Node *, dummynode);
368 setarrayvector(L, t, narray);
369 setnodevector(L, t, nhash);
370 return t;
371}
372
373
374void luaH_free (lua_State *L, Table *t) {

Callers 6

luaV_executeFunction · 0.85
f_luaopenFunction · 0.85
open_funcFunction · 0.85
collectvalidlinesFunction · 0.85
adjust_varargsFunction · 0.85
lua_createtableFunction · 0.85

Calls 3

luaC_linkFunction · 0.85
setarrayvectorFunction · 0.85
setnodevectorFunction · 0.85

Tested by

no test coverage detected