Przeglądaj źródła

variable renaming: 'lualibs' -> 'loadedlibs'; 'luareqlibs' ->
'preloadedlibs'

Roberto Ierusalimschy 16 lat temu
rodzic
commit
0cc3add9f8
1 zmienionych plików z 7 dodań i 7 usunięć
  1. 7 7
      linit.c

+ 7 - 7
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);