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

Function luaF_close

depends/lua/src/lfunc.c:83–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81
82
83void luaF_close (lua_State *L, StkId level) {
84 UpVal *uv;
85 while (L->openupval != NULL && (uv = L->openupval)->v >= level) {
86 lua_assert(upisopen(uv));
87 L->openupval = uv->u.open.next; /* remove from 'open' list */
88 if (uv->refcount == 0) /* no references? */
89 luaM_free(L, uv); /* free upvalue */
90 else {
91 setobj(L, &uv->u.value, uv->v); /* move value to upvalue slot */
92 uv->v = &uv->u.value; /* now current value lives here */
93 luaC_upvalbarrier(L, uv);
94 }
95 }
96}
97
98
99Proto *luaF_newproto (lua_State *L) {

Callers 5

luaV_executeFunction · 0.85
close_stateFunction · 0.85
luaE_freethreadFunction · 0.85
recoverFunction · 0.85
luaD_pcallFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected