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