diff options
Diffstat (limited to 'loadlib.c')
| -rw-r--r-- | loadlib.c | 6 |
1 files changed, 1 insertions, 5 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: loadlib.c,v 1.56 2006/10/10 17:40:17 roberto Exp roberto $ | 2 | ** $Id: loadlib.c,v 1.57 2007/03/26 15:57:35 roberto Exp roberto $ |
| 3 | ** Dynamic library loader for Lua | 3 | ** Dynamic library loader for Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | ** | 5 | ** |
| @@ -628,10 +628,6 @@ LUALIB_API int luaopen_package (lua_State *L) { | |||
| 628 | lua_setfield(L, -2, "__gc"); | 628 | lua_setfield(L, -2, "__gc"); |
| 629 | /* create `package' table */ | 629 | /* create `package' table */ |
| 630 | luaL_register(L, LUA_LOADLIBNAME, pk_funcs); | 630 | luaL_register(L, LUA_LOADLIBNAME, pk_funcs); |
| 631 | #if defined(LUA_COMPAT_LOADLIB) | ||
| 632 | lua_getfield(L, -1, "loadlib"); | ||
| 633 | lua_setfield(L, LUA_GLOBALSINDEX, "loadlib"); | ||
| 634 | #endif | ||
| 635 | lua_pushvalue(L, -1); | 631 | lua_pushvalue(L, -1); |
| 636 | lua_replace(L, LUA_ENVIRONINDEX); | 632 | lua_replace(L, LUA_ENVIRONINDEX); |
| 637 | /* create `loaders' table */ | 633 | /* create `loaders' table */ |
