From 0cc3add9f80efa62722b085a281aa449e9a0112c Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 1 May 2009 10:46:35 -0300 Subject: [PATCH] variable renaming: 'lualibs' -> 'loadedlibs'; 'luareqlibs' -> 'preloadedlibs' --- linit.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/linit.c b/linit.c index 96193423..7eb3cfbd 100644 --- a/linit.c +++ b/linit.c @@ -1,5 +1,5 @@ /* -** $Id: linit.c,v 1.16 2008/01/02 16:16:28 roberto Exp roberto $ +** $Id: linit.c,v 1.17 2009/05/01 13:37:11 roberto Exp roberto $ ** Initialization of libraries for lua.c ** See Copyright Notice in lua.h */ @@ -17,7 +17,7 @@ /* ** these libs are loaded by lua.c and are readily available to any program */ -static const luaL_Reg lualibs[] = { +static const luaL_Reg loadedlibs[] = { {"_G", luaopen_base}, {LUA_LOADLIBNAME, luaopen_package}, {LUA_TABLIBNAME, luaopen_table}, @@ -32,22 +32,22 @@ static const luaL_Reg lualibs[] = { /* ** these libs are preloaded and must be required before used */ -static const luaL_Reg luareqlibs[] = { +static const luaL_Reg preloadedlibs[] = { {LUA_DBLIBNAME, luaopen_debug}, {NULL, NULL} }; LUALIB_API void luaL_openlibs (lua_State *L) { - /* call open functions from 'lualibs' */ - const luaL_Reg *lib = lualibs; + /* call open functions from 'loadedlibs' */ + const luaL_Reg *lib = loadedlibs; for (; lib->func; lib++) { lua_pushcfunction(L, lib->func); lua_pushstring(L, lib->name); lua_call(L, 1, 0); } - /* add open functions from 'luareqlibs' into 'package.preload' table */ - lib = luareqlibs; + /* add open functions from 'preloadedlibs' into 'package.preload' table */ + lib = preloadedlibs; luaL_findtable(L, LUA_GLOBALSINDEX, "package.preload", 0); for (; lib->func; lib++) { lua_pushcfunction(L, lib->func);