Lines Matching refs:ar
61 static int pushglobalfuncname (lua_State *L, lua_Debug *ar) {
63 lua_getinfo(L, "f", ar); /* push function */
77 static void pushfuncname (lua_State *L, lua_Debug *ar) {
78 if (*ar->namewhat != '\0') /* is there a name? */
79 lua_pushfstring(L, "function " LUA_QS, ar->name);
80 else if (*ar->what == 'm') /* main? */
82 else if (*ar->what == 'C') {
83 if (pushglobalfuncname(L, ar)) {
91 lua_pushfstring(L, "function <%s:%d>", ar->short_src, ar->linedefined);
96 lua_Debug ar;
99 while (lua_getstack(L, le, &ar)) { li = le; le *= 2; }
103 if (lua_getstack(L, m, &ar)) li = m + 1;
112 lua_Debug ar;
118 while (lua_getstack(L1, level++, &ar)) {
124 lua_getinfo(L1, "Slnt", &ar);
125 lua_pushfstring(L, "\n\t%s:", ar.short_src);
126 if (ar.currentline > 0)
127 lua_pushfstring(L, "%d:", ar.currentline);
129 pushfuncname(L, &ar);
130 if (ar.istailcall)
148 lua_Debug ar;
149 if (!lua_getstack(L, 0, &ar)) /* no stack frame? */
151 lua_getinfo(L, "n", &ar);
152 if (strcmp(ar.namewhat, "method") == 0) {
156 ar.name, extramsg);
158 if (ar.name == NULL)
159 ar.name = (pushglobalfuncname(L, &ar)) ? lua_tostring(L, -1) : "?";
161 narg, ar.name, extramsg);
178 lua_Debug ar;
179 if (lua_getstack(L, level, &ar)) { /* check function at level */
180 lua_getinfo(L, "Sl", &ar); /* get info about it */
181 if (ar.currentline > 0) { /* is there info? */
182 lua_pushfstring(L, "%s:%d: ", ar.short_src, ar.currentline);