** Traverse a Lua closure, marking its prototype and its upvalues. ** (Both can be NULL while closure is being created.) */
| 670 | ** (Both can be NULL while closure is being created.) |
| 671 | */ |
| 672 | static l_mem traverseLclosure (global_State *g, LClosure *cl) { |
| 673 | int i; |
| 674 | markobjectN(g, cl->p); /* mark its prototype */ |
| 675 | for (i = 0; i < cl->nupvalues; i++) { /* visit its upvalues */ |
| 676 | UpVal *uv = cl->upvals[i]; |
| 677 | markobjectN(g, uv); /* mark upvalue */ |
| 678 | } |
| 679 | return 1 + cl->nupvalues; |
| 680 | } |
| 681 | |
| 682 | |
| 683 | /* |