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

Function luaF_initupvals

depends/lua/src/lfunc.c:45–54  ·  view source on GitHub ↗

** fill a closure with new closed upvalues */

Source from the content-addressed store, hash-verified

43** fill a closure with new closed upvalues
44*/
45void luaF_initupvals (lua_State *L, LClosure *cl) {
46 int i;
47 for (i = 0; i < cl->nupvalues; i++) {
48 UpVal *uv = luaM_new(L, UpVal);
49 uv->refcount = 1;
50 uv->v = &uv->u.value; /* make it closed */
51 setnilvalue(uv->v);
52 cl->upvals[i] = uv;
53 }
54}
55
56
57UpVal *luaF_findupval (lua_State *L, StkId level) {

Callers 1

f_parserFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected