| 3239 | } |
| 3240 | |
| 3241 | static int compat53_pushglobalfuncname(lua_State* L, lua_Debug* ar) { |
| 3242 | int top = lua_gettop(L); |
| 3243 | lua_getinfo(L, "f", ar); /* push function */ |
| 3244 | lua_pushvalue(L, LUA_GLOBALSINDEX); |
| 3245 | if (compat53_findfield(L, top + 1, 2)) { |
| 3246 | lua_copy(L, -1, top + 1); /* move name to proper place */ |
| 3247 | lua_pop(L, 2); /* remove pushed values */ |
| 3248 | return 1; |
| 3249 | } |
| 3250 | else { |
| 3251 | lua_settop(L, top); /* remove function and global table */ |
| 3252 | return 0; |
| 3253 | } |
| 3254 | } |
| 3255 | |
| 3256 | static void compat53_pushfuncname(lua_State* L, lua_Debug* ar) { |
| 3257 | if (*ar->namewhat != '\0') /* is there a name? */ |
no test coverage detected