MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / collectvalidlines

Function collectvalidlines

Source/Misc/lua/src/lua.c:4685–4698  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4683
4684
4685static void collectvalidlines (lua_State *L, Closure *f) {
4686if (f == NULL || f->c.isC) {
4687setnilvalue(L->top);
4688}
4689else {
4690Table *t = luaH_new(L, 0, 0);
4691int *lineinfo = f->l.p->lineinfo;
4692int i;
4693for (i=0; i<f->l.p->sizelineinfo; i++)
4694setbvalue(luaH_setnum(L, t, lineinfo[i]), 1);
4695sethvalue(L, L->top, t);
4696}
4697incr_top(L);
4698}
4699
4700
4701static int auxgetinfo (lua_State *L, const char *what, lua_Debug *ar,

Callers 1

lua_getinfoFunction · 0.85

Calls 2

luaH_newFunction · 0.85
luaH_setnumFunction · 0.85

Tested by

no test coverage detected