Lua 5.1.4: linit.c
L0001
L0006
L0007
L0008 #define linit_c
L0009 #define LUA_LIB
L0010
L0011 #include "lua.h"
L0012
L0013 #include "lualib.h"
L0014 #include "lauxlib.h"
L0015
L0016
L0017 static const luaL_Reg lualibs[] = {
L0018 {"", luaopen_base},
L0019 {LUA_LOADLIBNAME, luaopen_package},
L0020 {LUA_TABLIBNAME, luaopen_table},
L0021 {LUA_IOLIBNAME, luaopen_io},
L0022 {LUA_OSLIBNAME, luaopen_os},
L0023 {LUA_STRLIBNAME, luaopen_string},
L0024 {LUA_MATHLIBNAME, luaopen_math},
L0025 {LUA_DBLIBNAME, luaopen_debug},
L0026 {NULL, NULL}
L0027 };
L0028
L0029
L0030 LUALIB_API void luaL_openlibs (lua_State *L) {
L0031 const luaL_Reg *lib = lualibs;
L0032 for (; lib->func; lib++) {
L0033 lua_pushcfunction(L, lib->func);
L0034 lua_pushstring(L, lib->name);
L0035 lua_call(L, 1, 0);
L0036 }
L0037 }
L0038
Generated by pretty.lua