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

Function collectvalidlines

src/Chain/libraries/glua/ldebug.cpp:252–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250
251
252static 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
271static int auxgetinfo(lua_State *L, const char *what, lua_Debug *ar,

Callers 1

lua_getinfoFunction · 0.85

Calls 2

luaH_newFunction · 0.85
luaH_setintFunction · 0.85

Tested by

no test coverage detected