| 205 | |
| 206 | |
| 207 | static void collectvalidlines (lua_State *L, Closure *f) { |
| 208 | if (noLuaClosure(f)) { |
| 209 | setnilvalue(L->top); |
| 210 | api_incr_top(L); |
| 211 | } |
| 212 | else { |
| 213 | int i; |
| 214 | TValue v; |
| 215 | int *lineinfo = f->l.p->lineinfo; |
| 216 | Table *t = luaH_new(L); /* new table to store active lines */ |
| 217 | sethvalue(L, L->top, t); /* push it on stack */ |
| 218 | api_incr_top(L); |
| 219 | setbvalue(&v, 1); /* boolean 'true' to be the value of all indices */ |
| 220 | for (i = 0; i < f->l.p->sizelineinfo; i++) /* for all lines with code */ |
| 221 | luaH_setint(L, t, lineinfo[i], &v); /* table[line] = true */ |
| 222 | } |
| 223 | } |
| 224 | |
| 225 | |
| 226 | static int auxgetinfo (lua_State *L, const char *what, lua_Debug *ar, |
no test coverage detected