avoid using deprecated macros lua_[gs]etglobal
This commit is contained in:
4
linit.c
4
linit.c
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
** $Id: linit.c,v 1.19 2009/07/01 16:16:40 roberto Exp roberto $
|
||||
** $Id: linit.c,v 1.20 2009/09/05 12:39:29 roberto Exp roberto $
|
||||
** Initialization of libraries for lua.c and other clients
|
||||
** See Copyright Notice in lua.h
|
||||
*/
|
||||
@@ -64,7 +64,7 @@ LUALIB_API void luaL_openlibs (lua_State *L) {
|
||||
}
|
||||
lua_pop(L, 1); /* remove package.preload table */
|
||||
#ifdef LUA_COMPAT_DEBUGLIB
|
||||
lua_getglobal(L, "require");
|
||||
lua_getfield(L, LUA_GLOBALSINDEX, "require");
|
||||
lua_pushliteral(L, LUA_DBLIBNAME);
|
||||
lua_call(L, 1, 0); /* call 'require"debug"' */
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user