MCPcopy Create free account
hub / github.com/F-Stack/f-stack / luaH_new

Function luaH_new

app/redis-6.2.6/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.70
f_luaopenFunction · 0.70
open_funcFunction · 0.70
collectvalidlinesFunction · 0.70
adjust_varargsFunction · 0.70
lua_createtableFunction · 0.70

Calls 3

luaC_linkFunction · 0.85
setarrayvectorFunction · 0.70
setnodevectorFunction · 0.70

Tested by

no test coverage detected