Lines Matching refs:ar
62 static int pushglobalfuncname (lua_State *L, lua_Debug *ar) { in pushglobalfuncname() argument
64 lua_getinfo(L, "f", ar); /* push function */ in pushglobalfuncname()
78 static void pushfuncname (lua_State *L, lua_Debug *ar) { in pushfuncname() argument
79 if (*ar->namewhat != '\0') /* is there a name? */ in pushfuncname()
80 lua_pushfstring(L, "function " LUA_QS, ar->name); in pushfuncname()
81 else if (*ar->what == 'm') /* main? */ in pushfuncname()
83 else if (*ar->what == 'C') { in pushfuncname()
84 if (pushglobalfuncname(L, ar)) { in pushfuncname()
92 lua_pushfstring(L, "function <%s:%d>", ar->short_src, ar->linedefined); in pushfuncname()
97 lua_Debug ar; in countlevels() local
100 while (lua_getstack(L, le, &ar)) { li = le; le *= 2; } in countlevels()
104 if (lua_getstack(L, m, &ar)) li = m + 1; in countlevels()
113 lua_Debug ar; in luaL_traceback() local
119 while (lua_getstack(L1, level++, &ar)) { in luaL_traceback()
125 lua_getinfo(L1, "Slnt", &ar); in luaL_traceback()
126 lua_pushfstring(L, "\n\t%s:", ar.short_src); in luaL_traceback()
127 if (ar.currentline > 0) in luaL_traceback()
128 lua_pushfstring(L, "%d:", ar.currentline); in luaL_traceback()
130 pushfuncname(L, &ar); in luaL_traceback()
131 if (ar.istailcall) in luaL_traceback()
149 lua_Debug ar; in luaL_argerror() local
150 if (!lua_getstack(L, 0, &ar)) /* no stack frame? */ in luaL_argerror()
152 lua_getinfo(L, "n", &ar); in luaL_argerror()
153 if (strcmp(ar.namewhat, "method") == 0) { in luaL_argerror()
157 ar.name, extramsg); in luaL_argerror()
159 if (ar.name == NULL) in luaL_argerror()
160 ar.name = (pushglobalfuncname(L, &ar)) ? lua_tostring(L, -1) : "?"; in luaL_argerror()
162 narg, ar.name, extramsg); in luaL_argerror()
179 lua_Debug ar; in luaL_where() local
180 if (lua_getstack(L, level, &ar)) { /* check function at level */ in luaL_where()
181 lua_getinfo(L, "Sl", &ar); /* get info about it */ in luaL_where()
182 if (ar.currentline > 0) { /* is there info? */ in luaL_where()
183 lua_pushfstring(L, "%s:%d: ", ar.short_src, ar.currentline); in luaL_where()