| 250 | |
| 251 | |
| 252 | static void collectvalidlines(lua_State *L, Closure *f) { |
| 253 | if (noLuaClosure(f)) { |
| 254 | setnilvalue(L->top); |
| 255 | api_incr_top(L); |
| 256 | } |
| 257 | else { |
| 258 | int i; |
| 259 | TValue v; |
| 260 | int *lineinfo = f->l.p->lineinfo; |
| 261 | Table *t = luaH_new(L); /* new table to store active lines */ |
| 262 | sethvalue(L, L->top, t); /* push it on stack */ |
| 263 | api_incr_top(L); |
| 264 | setbvalue(&v, 1); /* boolean 'true' to be the value of all indices */ |
| 265 | for (i = 0; i < f->l.p->sizelineinfo; i++) /* for all lines with code */ |
| 266 | luaH_setint(L, t, lineinfo[i], &v); /* table[line] = true */ |
| 267 | } |
| 268 | } |
| 269 | |
| 270 | |
| 271 | static int auxgetinfo(lua_State *L, const char *what, lua_Debug *ar, |
no test coverage detected