MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / luaH_new

Function luaH_new

lua/ltable.c:392–405  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390
391
392Table *luaH_new (lua_State *L, int narray, int nhash) {
393 Table *t = luaM_new(L, Table);
394 luaC_link(L, obj2gco(t), LUA_TTABLE);
395 t->metatable = NULL;
396 t->flags = cast_byte(~0);
397 /* temporary values (kept only if some malloc fails) */
398 t->array = NULL;
399 t->sizearray = 0;
400 t->lsizenode = 0;
401 t->node = cast(Node *, dummynode);
402 setarrayvector(L, t, narray);
403 setnodevector(L, t, nhash);
404 return t;
405}
406
407
408void 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