MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / traverseLclosure

Function traverseLclosure

lib/lua/src/lgc.c:606–614  ·  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

604** (Both can be NULL while closure is being created.)
605*/
606static int traverseLclosure (global_State *g, LClosure *cl) {
607 int i;
608 markobjectN(g, cl->p); /* mark its prototype */
609 for (i = 0; i < cl->nupvalues; i++) { /* visit its upvalues */
610 UpVal *uv = cl->upvals[i];
611 markobjectN(g, uv); /* mark upvalue */
612 }
613 return 1 + cl->nupvalues;
614}
615
616
617/*

Callers 1

propagatemarkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected