diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-12-11 11:40:44 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-12-11 11:40:44 -0200 |
commit | 2e5179259655ffd137067f5dc47803740b7937ac (patch) | |
tree | 8d103b047f96fc93d77c9abd6c94458e8f9e5a7e /linit.c | |
parent | 3a9ae612a4982e5f543baf8eead0889369eb8260 (diff) | |
download | lua-2e5179259655ffd137067f5dc47803740b7937ac.tar.gz lua-2e5179259655ffd137067f5dc47803740b7937ac.tar.bz2 lua-2e5179259655ffd137067f5dc47803740b7937ac.zip |
avoid using deprecated macros lua_[gs]etglobal
Diffstat (limited to 'linit.c')
-rw-r--r-- | linit.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: linit.c,v 1.19 2009/07/01 16:16:40 roberto Exp roberto $ | 2 | ** $Id: linit.c,v 1.20 2009/09/05 12:39:29 roberto Exp roberto $ |
3 | ** Initialization of libraries for lua.c and other clients | 3 | ** Initialization of libraries for lua.c and other clients |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -64,7 +64,7 @@ LUALIB_API void luaL_openlibs (lua_State *L) { | |||
64 | } | 64 | } |
65 | lua_pop(L, 1); /* remove package.preload table */ | 65 | lua_pop(L, 1); /* remove package.preload table */ |
66 | #ifdef LUA_COMPAT_DEBUGLIB | 66 | #ifdef LUA_COMPAT_DEBUGLIB |
67 | lua_getglobal(L, "require"); | 67 | lua_getfield(L, LUA_GLOBALSINDEX, "require"); |
68 | lua_pushliteral(L, LUA_DBLIBNAME); | 68 | lua_pushliteral(L, LUA_DBLIBNAME); |
69 | lua_call(L, 1, 0); /* call 'require"debug"' */ | 69 | lua_call(L, 1, 0); /* call 'require"debug"' */ |
70 | #endif | 70 | #endif |