diff options
Diffstat (limited to 'lauxlib.c')
-rw-r--r-- | lauxlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lauxlib.c,v 1.289 2016/12/20 18:37:00 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.290 2017/04/24 18:06:12 roberto Exp roberto $ |
3 | ** Auxiliary functions for building Lua libraries | 3 | ** Auxiliary functions for building Lua libraries |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -76,7 +76,7 @@ static int pushglobalfuncname (lua_State *L, lua_Debug *ar) { | |||
76 | lua_getfield(L, LUA_REGISTRYINDEX, LUA_LOADED_TABLE); | 76 | lua_getfield(L, LUA_REGISTRYINDEX, LUA_LOADED_TABLE); |
77 | if (findfield(L, top + 1, 2)) { | 77 | if (findfield(L, top + 1, 2)) { |
78 | const char *name = lua_tostring(L, -1); | 78 | const char *name = lua_tostring(L, -1); |
79 | if (strncmp(name, "_G.", 3) == 0) { /* name start with '_G.'? */ | 79 | if (strncmp(name, LUA_GNAME ".", 3) == 0) { /* name start with '_G.'? */ |
80 | lua_pushstring(L, name + 3); /* push name without prefix */ | 80 | lua_pushstring(L, name + 3); /* push name without prefix */ |
81 | lua_remove(L, -2); /* remove original name */ | 81 | lua_remove(L, -2); /* remove original name */ |
82 | } | 82 | } |