MCPcopy Create free account
hub / github.com/DFHack/dfhack / luaF_newLclosure

Function luaF_newLclosure

depends/lua/src/lfunc.c:33–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31
32
33LClosure *luaF_newLclosure (lua_State *L, int n) {
34 GCObject *o = luaC_newobj(L, LUA_TLCL, sizeLclosure(n));
35 LClosure *c = gco2lcl(o);
36 c->p = NULL;
37 c->nupvalues = cast_byte(n);
38 while (n--) c->upvals[n] = NULL;
39 return c;
40}
41
42/*
43** fill a closure with new closed upvalues

Callers 3

pushclosureFunction · 0.85
luaU_undumpFunction · 0.85
luaY_parserFunction · 0.85

Calls 1

luaC_newobjFunction · 0.85

Tested by

no test coverage detected