diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2007-12-27 11:02:25 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2007-12-27 11:02:25 -0200 |
commit | f5ae26ec6c2eb69f03f316e59c1e1977c52c7c23 (patch) | |
tree | b4c761dac7648caea2cc20f8ebc2dd5b27a3fa1e /linit.c | |
parent | 98194db4295726069137d13b8d24fca8cbf892b6 (diff) | |
download | lua-f5ae26ec6c2eb69f03f316e59c1e1977c52c7c23.tar.gz lua-f5ae26ec6c2eb69f03f316e59c1e1977c52c7c23.tar.bz2 lua-f5ae26ec6c2eb69f03f316e59c1e1977c52c7c23.zip |
official branch for Lua 5.1
Diffstat (limited to 'linit.c')
-rw-r--r-- | linit.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/linit.c b/linit.c deleted file mode 100644 index 5f3ceda7..00000000 --- a/linit.c +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | /* | ||
2 | ** $Id: linit.c,v 1.13 2005/08/26 17:36:32 roberto Exp roberto $ | ||
3 | ** Initialization of libraries for lua.c | ||
4 | ** See Copyright Notice in lua.h | ||
5 | */ | ||
6 | |||
7 | |||
8 | #define linit_c | ||
9 | #define LUA_LIB | ||
10 | |||
11 | #include "lua.h" | ||
12 | |||
13 | #include "lualib.h" | ||
14 | #include "lauxlib.h" | ||
15 | |||
16 | |||
17 | static const luaL_Reg lualibs[] = { | ||
18 | {"", luaopen_base}, | ||
19 | {LUA_LOADLIBNAME, luaopen_package}, | ||
20 | {LUA_TABLIBNAME, luaopen_table}, | ||
21 | {LUA_IOLIBNAME, luaopen_io}, | ||
22 | {LUA_OSLIBNAME, luaopen_os}, | ||
23 | {LUA_STRLIBNAME, luaopen_string}, | ||
24 | {LUA_MATHLIBNAME, luaopen_math}, | ||
25 | {LUA_DBLIBNAME, luaopen_debug}, | ||
26 | {NULL, NULL} | ||
27 | }; | ||
28 | |||
29 | |||
30 | LUALIB_API void luaL_openlibs (lua_State *L) { | ||
31 | const luaL_Reg *lib = lualibs; | ||
32 | for (; lib->func; lib++) { | ||
33 | lua_pushcfunction(L, lib->func); | ||
34 | lua_pushstring(L, lib->name); | ||
35 | lua_call(L, 1, 0); | ||
36 | } | ||
37 | } | ||
38 | |||