MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / traverseLclosure

Function traverseLclosure

extlibs/lua/src/lgc.c:549–557  ·  view source on GitHub ↗

** Traverse a Lua closure, marking its prototype and its upvalues. ** (Both can be NULL while closure is being created.) */

Source from the content-addressed store, hash-verified

547** (Both can be NULL while closure is being created.)
548*/
549static int traverseLclosure (global_State *g, LClosure *cl) {
550 int i;
551 markobjectN(g, cl->p); /* mark its prototype */
552 for (i = 0; i < cl->nupvalues; i++) { /* visit its upvalues */
553 UpVal *uv = cl->upvals[i];
554 markobjectN(g, uv); /* mark upvalue */
555 }
556 return 1 + cl->nupvalues;
557}
558
559
560/*

Callers 1

propagatemarkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected