** Traverse a Lua closure, marking its prototype and its upvalues. ** (Both can be NULL while closure is being created.) */
| 547 | ** (Both can be NULL while closure is being created.) |
| 548 | */ |
| 549 | static 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 | /* |