aboutsummaryrefslogtreecommitdiff
path: root/linit.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-06-30 14:40:27 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2010-06-30 14:40:27 -0300
commita139e2e003e0b62b7d34eeda20dd2354e74885f9 (patch)
tree7893fbccec3852dbf35321d2612074c2259570ef /linit.c
parenta71c5f6f531a2503ff80e579e6c3bb95968645ba (diff)
downloadlua-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linit.c b/linit.c
index 99c33e92..6c803270 100644
--- a/linit.c
+++ b/linit.c
@@ -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);