MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / traverseLclosure

Function traverseLclosure

3rd/lua-5.4.3/src/lgc.c:598–606  ·  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

596** (Both can be NULL while closure is being created.)
597*/
598static int traverseLclosure (global_State *g, LClosure *cl) {
599 int i;
600 markobjectN(g, cl->p); /* mark its prototype */
601 for (i = 0; i < cl->nupvalues; i++) { /* visit its upvalues */
602 UpVal *uv = cl->upvals[i];
603 markobjectN(g, uv); /* mark upvalue */
604 }
605 return 1 + cl->nupvalues;
606}
607
608
609/*

Callers 1

propagatemarkFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected