aboutsummaryrefslogtreecommitdiff
path: root/ldebug.c
diff options
context:
space:
mode:
Diffstat (limited to 'ldebug.c')
-rw-r--r--ldebug.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/ldebug.c b/ldebug.c
index 9a0242b6..e57beff6 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldebug.c,v 2.81 2011/04/28 14:00:11 roberto Exp roberto $ 2** $Id: ldebug.c,v 2.82 2011/06/02 19:31:40 roberto Exp roberto $
3** Debug Interface 3** Debug Interface
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -190,12 +190,14 @@ static void collectvalidlines (lua_State *L, Closure *f) {
190 } 190 }
191 else { 191 else {
192 int i; 192 int i;
193 TValue v;
193 int *lineinfo = f->l.p->lineinfo; 194 int *lineinfo = f->l.p->lineinfo;
194 Table *t = luaH_new(L); 195 Table *t = luaH_new(L); /* new table to store active lines */
195 sethvalue(L, L->top, t); 196 sethvalue(L, L->top, t); /* push it on stack */
196 incr_top(L); 197 incr_top(L);
197 for (i=0; i<f->l.p->sizelineinfo; i++) 198 setbvalue(&v, 1); /* boolean 'true' to be the value of all indices */
198 setbvalue(luaH_setint(L, t, lineinfo[i]), 1); 199 for (i = 0; i < f->l.p->sizelineinfo; i++) /* for all lines with code */
200 luaH_setint(L, t, lineinfo[i], &v); /* table[line] = true */
199 } 201 }
200} 202}
201 203