|
@@ -80,6 +80,7 @@ static int pushglobalfuncname (lua_State *L, lua_Debug *ar) {
|
|
int top = lua_gettop(L);
|
|
int top = lua_gettop(L);
|
|
lua_getinfo(L, "f", ar); /* push function */
|
|
lua_getinfo(L, "f", ar); /* push function */
|
|
lua_getfield(L, LUA_REGISTRYINDEX, LUA_LOADED_TABLE);
|
|
lua_getfield(L, LUA_REGISTRYINDEX, LUA_LOADED_TABLE);
|
|
|
|
+ luaL_checkstack(L, 6, "not enough stack"); /* slots for 'findfield' */
|
|
if (findfield(L, top + 1, 2)) {
|
|
if (findfield(L, top + 1, 2)) {
|
|
const char *name = lua_tostring(L, -1);
|
|
const char *name = lua_tostring(L, -1);
|
|
if (strncmp(name, LUA_GNAME ".", 3) == 0) { /* name start with '_G.'? */
|
|
if (strncmp(name, LUA_GNAME ".", 3) == 0) { /* name start with '_G.'? */
|