commit 0cc3add9f80efa62722b085a281aa449e9a0112c
parent 71c2eeff987d8e96cf1aaf98f3512c686eb1bd9c
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Fri, 1 May 2009 10:46:11 -0300
variable renaming: 'lualibs' -> 'loadedlibs'; 'luareqlibs' ->
'preloadedlibs'
Diffstat:
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git 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);