diff options
Diffstat (limited to 'lauxlib.c')
| -rw-r--r-- | lauxlib.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lauxlib.c,v 1.191 2009/09/18 18:58:45 roberto Exp roberto $ | 2 | ** $Id: lauxlib.c,v 1.192 2009/09/28 12:36:40 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 | */ |
| @@ -75,8 +75,8 @@ static int pushglobalfuncname (lua_State *L, lua_Debug *ar) { | |||
| 75 | lua_getinfo(L, "f", ar); /* push function */ | 75 | lua_getinfo(L, "f", ar); /* push function */ |
| 76 | lua_pushvalue(L, LUA_GLOBALSINDEX); /* push global table */ | 76 | lua_pushvalue(L, LUA_GLOBALSINDEX); /* push global table */ |
| 77 | if (findfield(L, top + 1, 2)) { | 77 | if (findfield(L, top + 1, 2)) { |
| 78 | lua_replace(L, top + 1); /* move name to proper place */ | 78 | lua_copy(L, -1, top + 1); /* move name to proper place */ |
| 79 | lua_pop(L, 1); /* remove other pushed value */ | 79 | lua_pop(L, 2); /* remove pushed values */ |
| 80 | return 1; | 80 | return 1; |
| 81 | } | 81 | } |
| 82 | else { | 82 | else { |
