Lines Matching refs:ar
79 static int pushglobalfuncname (lua_State *L, lua_Debug *ar) {
81 lua_getinfo(L, "f", ar); /* push function */
100 static void pushfuncname (lua_State *L, lua_Debug *ar) {
101 if (pushglobalfuncname(L, ar)) { /* try first a global name */
105 else if (*ar->namewhat != '\0') /* is there a name from code? */
106 lua_pushfstring(L, "%s '%s'", ar->namewhat, ar->name); /* use it */
107 else if (*ar->what == 'm') /* main? */
109 else if (*ar->what != 'C') /* for Lua functions, use <file:line> */
110 lua_pushfstring(L, "function <%s:%d>", ar->short_src, ar->linedefined);
117 lua_Debug ar;
120 while (lua_getstack(L, le, &ar)) { li = le; le *= 2; }
124 if (lua_getstack(L, m, &ar)) li = m + 1;
134 lua_Debug ar;
143 while (lua_getstack(L1, level++, &ar)) {
151 lua_getinfo(L1, "Slnt", &ar);
152 if (ar.currentline <= 0)
153 lua_pushfstring(L, "\n\t%s: in ", ar.short_src);
155 lua_pushfstring(L, "\n\t%s:%d: in ", ar.short_src, ar.currentline);
157 pushfuncname(L, &ar);
159 if (ar.istailcall)
176 lua_Debug ar;
177 if (!lua_getstack(L, 0, &ar)) /* no stack frame? */
179 lua_getinfo(L, "n", &ar);
180 if (strcmp(ar.namewhat, "method") == 0) {
184 ar.name, extramsg);
186 if (ar.name == NULL)
187 ar.name = (pushglobalfuncname(L, &ar)) ? lua_tostring(L, -1) : "?";
189 arg, ar.name, extramsg);
217 lua_Debug ar;
218 if (lua_getstack(L, level, &ar)) { /* check function at level */
219 lua_getinfo(L, "Sl", &ar); /* get info about it */
220 if (ar.currentline > 0) { /* is there info? */
221 lua_pushfstring(L, "%s:%d: ", ar.short_src, ar.currentline);