浏览代码

correct name to open package library

Roberto Ierusalimschy 20 年之前
父节点
当前提交
c7b4f44772
共有 3 个文件被更改,包括 6 次插入6 次删除
  1. 2 2
      linit.c
  2. 2 2
      loadlib.c
  3. 2 2
      lualib.h

+ 2 - 2
linit.c

@@ -1,5 +1,5 @@
 /*
 /*
-** $Id: linit.c,v 1.10 2005/03/08 13:37:55 roberto Exp roberto $
+** $Id: linit.c,v 1.11 2005/04/13 17:24:20 roberto Exp roberto $
 ** Initialization of libraries for lua.c
 ** Initialization of libraries for lua.c
 ** See Copyright Notice in lua.h
 ** See Copyright Notice in lua.h
 */
 */
@@ -22,7 +22,7 @@ static const luaL_reg lualibs[] = {
   {LUA_STRLIBNAME, luaopen_string},
   {LUA_STRLIBNAME, luaopen_string},
   {LUA_MATHLIBNAME, luaopen_math},
   {LUA_MATHLIBNAME, luaopen_math},
   {LUA_DBLIBNAME, luaopen_debug},
   {LUA_DBLIBNAME, luaopen_debug},
-  {LUA_LOADLIBNAME, luaopen_loadlib},
+  {LUA_LOADLIBNAME, luaopen_package},
   {NULL, NULL}
   {NULL, NULL}
 };
 };
 
 

+ 2 - 2
loadlib.c

@@ -1,5 +1,5 @@
 /*
 /*
-** $Id: loadlib.c,v 1.35 2005/08/01 04:21:17 roberto Exp roberto $
+** $Id: loadlib.c,v 1.36 2005/08/09 17:58:09 roberto Exp roberto $
 ** Dynamic library loader for Lua
 ** Dynamic library loader for Lua
 ** See Copyright Notice in lua.h
 ** See Copyright Notice in lua.h
 **
 **
@@ -583,7 +583,7 @@ static const lua_CFunction loaders[] =
   {loader_preload, loader_Lua, loader_C, loader_Croot, NULL};
   {loader_preload, loader_Lua, loader_C, loader_Croot, NULL};
 
 
 
 
-LUALIB_API int luaopen_loadlib (lua_State *L) {
+LUALIB_API int luaopen_package (lua_State *L) {
   int i;
   int i;
   /* create new type _LOADLIB */
   /* create new type _LOADLIB */
   luaL_newmetatable(L, "_LOADLIB");
   luaL_newmetatable(L, "_LOADLIB");

+ 2 - 2
lualib.h

@@ -1,5 +1,5 @@
 /*
 /*
-** $Id: lualib.h,v 1.33 2005/01/10 16:31:30 roberto Exp roberto $
+** $Id: lualib.h,v 1.34 2005/04/13 17:24:20 roberto Exp roberto $
 ** Lua standard libraries
 ** Lua standard libraries
 ** See Copyright Notice in lua.h
 ** See Copyright Notice in lua.h
 */
 */
@@ -37,7 +37,7 @@ LUALIB_API int (luaopen_math) (lua_State *L);
 LUALIB_API int (luaopen_debug) (lua_State *L);
 LUALIB_API int (luaopen_debug) (lua_State *L);
 
 
 #define LUA_LOADLIBNAME	"package"
 #define LUA_LOADLIBNAME	"package"
-LUALIB_API int (luaopen_loadlib) (lua_State *L);
+LUALIB_API int (luaopen_package) (lua_State *L);
 
 
 
 
 /* open all previous libraries */
 /* open all previous libraries */