summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-01-10 14:31:30 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2005-01-10 14:31:30 -0200
commit162b66624d6868e71010ef3988b482fc811def34 (patch)
treeaebf5f5c036172b4aeec6874aff1002eb8be9e9b
parente791f025c0c59b0a428fab604a7e2251cca568f5 (diff)
downloadlua-162b66624d6868e71010ef3988b482fc811def34.tar.gz
lua-162b66624d6868e71010ef3988b482fc811def34.tar.bz2
lua-162b66624d6868e71010ef3988b482fc811def34.zip
no more `lua_userinit' macro
-rw-r--r--ltests.h7
-rw-r--r--luaconf.h12
-rw-r--r--lualib.h20
3 files changed, 15 insertions, 24 deletions
diff --git a/ltests.h b/ltests.h
index 9338851c..57fde1a7 100644
--- a/ltests.h
+++ b/ltests.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltests.h,v 2.9 2004/07/16 13:17:00 roberto Exp roberto $ 2** $Id: ltests.h,v 2.10 2004/09/10 17:30:46 roberto Exp roberto $
3** Internal Header for Debugging of the Lua Implementation 3** Internal Header for Debugging of the Lua Implementation
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -65,8 +65,9 @@ extern int islocked;
65 65
66int luaB_opentests (lua_State *L); 66int luaB_opentests (lua_State *L);
67 67
68#undef lua_userinit 68#ifdef lua_c
69#define lua_userinit(L) { luaopen_stdlibs(L); luaB_opentests(L); } 69#define luaopen_stdlibs(L) { (luaopen_stdlibs)(L); luaB_opentests(L); }
70#endif
70 71
71 72
72 73
diff --git a/luaconf.h b/luaconf.h
index 6d3d34f8..2bccf671 100644
--- a/luaconf.h
+++ b/luaconf.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: luaconf.h,v 1.23 2005/01/04 12:46:04 roberto Exp roberto $ 2** $Id: luaconf.h,v 1.24 2005/01/07 20:00:33 roberto Exp roberto $
3** Configuration file for Lua 3** Configuration file for Lua
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -108,16 +108,6 @@
108#define PROGNAME "lua" 108#define PROGNAME "lua"
109 109
110 110
111/*
112** this macro allows you to open other libraries when starting the
113** stand-alone interpreter
114*/
115#define lua_userinit(L) luaopen_stdlibs(L)
116/*
117** #define lua_userinit(L) { int luaopen_mylibs(lua_State *L); \
118** luaopen_stdlibs(L); luaopen_mylibs(L); }
119*/
120
121 111
122 112
123/* 113/*
diff --git a/lualib.h b/lualib.h
index 24a3c7bf..5c0bf255 100644
--- a/lualib.h
+++ b/lualib.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lualib.h,v 1.31 2004/07/09 14:29:29 roberto Exp roberto $ 2** $Id: lualib.h,v 1.32 2004/07/09 15:47:48 roberto Exp roberto $
3** Lua standard libraries 3** Lua standard libraries
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -16,32 +16,32 @@
16 16
17 17
18#define LUA_COLIBNAME "coroutine" 18#define LUA_COLIBNAME "coroutine"
19LUALIB_API int luaopen_base (lua_State *L); 19LUALIB_API int (luaopen_base) (lua_State *L);
20 20
21#define LUA_TABLIBNAME "table" 21#define LUA_TABLIBNAME "table"
22LUALIB_API int luaopen_table (lua_State *L); 22LUALIB_API int (luaopen_table) (lua_State *L);
23 23
24#define LUA_IOLIBNAME "io" 24#define LUA_IOLIBNAME "io"
25LUALIB_API int luaopen_io (lua_State *L); 25LUALIB_API int (luaopen_io) (lua_State *L);
26 26
27#define LUA_OSLIBNAME "os" 27#define LUA_OSLIBNAME "os"
28LUALIB_API int luaopen_os (lua_State *L); 28LUALIB_API int (luaopen_os) (lua_State *L);
29 29
30#define LUA_STRLIBNAME "string" 30#define LUA_STRLIBNAME "string"
31LUALIB_API int luaopen_string (lua_State *L); 31LUALIB_API int (luaopen_string) (lua_State *L);
32 32
33#define LUA_MATHLIBNAME "math" 33#define LUA_MATHLIBNAME "math"
34LUALIB_API int luaopen_math (lua_State *L); 34LUALIB_API int (luaopen_math) (lua_State *L);
35 35
36#define LUA_DBLIBNAME "debug" 36#define LUA_DBLIBNAME "debug"
37LUALIB_API int luaopen_debug (lua_State *L); 37LUALIB_API int (luaopen_debug) (lua_State *L);
38 38
39 39
40LUALIB_API int luaopen_loadlib (lua_State *L); 40LUALIB_API int (luaopen_loadlib) (lua_State *L);
41 41
42 42
43/* open all previous libraries */ 43/* open all previous libraries */
44LUALIB_API int luaopen_stdlibs (lua_State *L); 44LUALIB_API int (luaopen_stdlibs) (lua_State *L);
45 45
46 46
47#endif 47#endif