MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / collectvalidlines

Function collectvalidlines

other_src/lua/src/ldebug.cpp:177–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175
176
177static void collectvalidlines (lua_State *L, Closure *f) {
178 if (f == NULL || f->c.isC) {
179 setnilvalue(L->top);
180 }
181 else {
182 Table *t = luaH_new(L, 0, 0);
183 int *lineinfo = f->l.p->lineinfo;
184 int i;
185 for (i=0; i<f->l.p->sizelineinfo; i++)
186 setbvalue(luaH_setnum(L, t, lineinfo[i]), 1);
187 sethvalue(L, L->top, t);
188 }
189 incr_top(L);
190}
191
192
193static int auxgetinfo (lua_State *L, const char *what, lua_Debug *ar,

Callers 1

lua_getinfoFunction · 0.70

Calls 2

luaH_newFunction · 0.70
luaH_setnumFunction · 0.70

Tested by

no test coverage detected