diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-06-30 14:40:27 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-06-30 14:40:27 -0300 |
| commit | a139e2e003e0b62b7d34eeda20dd2354e74885f9 (patch) | |
| tree | 7893fbccec3852dbf35321d2612074c2259570ef /linit.c | |
| parent | a71c5f6f531a2503ff80e579e6c3bb95968645ba (diff) | |
| download | lua-a139e2e003e0b62b7d34eeda20dd2354e74885f9.tar.gz lua-a139e2e003e0b62b7d34eeda20dd2354e74885f9.tar.bz2 lua-a139e2e003e0b62b7d34eeda20dd2354e74885f9.zip | |
old (and complex) luaL_findtable now used only in compatibility code
inside lauxlib.c
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.25 2010/05/20 12:57:59 roberto Exp roberto $ | 2 | ** $Id: linit.c,v 1.26 2010/06/10 21:29:47 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 | */ |
| @@ -59,7 +59,7 @@ LUALIB_API void luaL_openlibs (lua_State *L) { | |||
| 59 | } | 59 | } |
| 60 | /* add open functions from 'preloadedlibs' into 'package.preload' table */ | 60 | /* add open functions from 'preloadedlibs' into 'package.preload' table */ |
| 61 | lua_pushglobaltable(L); | 61 | lua_pushglobaltable(L); |
| 62 | luaL_findtable(L, 0, "package.preload", 0); | 62 | luaL_findtable(L, LUA_REGISTRYINDEX, "_PRELOAD"); |
| 63 | for (lib = preloadedlibs; lib->func; lib++) { | 63 | for (lib = preloadedlibs; lib->func; lib++) { |
| 64 | lua_pushcfunction(L, lib->func); | 64 | lua_pushcfunction(L, lib->func); |
| 65 | lua_setfield(L, -2, lib->name); | 65 | lua_setfield(L, -2, lib->name); |
