diff options
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.30 2010/11/12 15:48:30 roberto Exp roberto $ | 2 | ** $Id: linit.c,v 1.31 2011/01/26 16:30:02 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 | */ |
| @@ -57,7 +57,7 @@ LUALIB_API void luaL_openlibs (lua_State *L) { | |||
| 57 | lua_pop(L, 1); /* remove lib */ | 57 | lua_pop(L, 1); /* remove lib */ |
| 58 | } | 58 | } |
| 59 | /* add open functions from 'preloadedlibs' into 'package.preload' table */ | 59 | /* add open functions from 'preloadedlibs' into 'package.preload' table */ |
| 60 | luaL_findtable(L, LUA_REGISTRYINDEX, "_PRELOAD"); | 60 | luaL_getsubtable(L, LUA_REGISTRYINDEX, "_PRELOAD"); |
| 61 | for (lib = preloadedlibs; lib->func; lib++) { | 61 | for (lib = preloadedlibs; lib->func; lib++) { |
| 62 | lua_pushcfunction(L, lib->func); | 62 | lua_pushcfunction(L, lib->func); |
| 63 | lua_setfield(L, -2, lib->name); | 63 | lua_setfield(L, -2, lib->name); |
