From 162b66624d6868e71010ef3988b482fc811def34 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 10 Jan 2005 14:31:30 -0200 Subject: [PATCH] no more `lua_userinit' macro --- ltests.h | 7 ++++--- luaconf.h | 12 +----------- lualib.h | 20 ++++++++++---------- 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 @@ /* -** $Id: ltests.h,v 2.9 2004/07/16 13:17:00 roberto Exp roberto $ +** $Id: ltests.h,v 2.10 2004/09/10 17:30:46 roberto Exp roberto $ ** Internal Header for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -65,8 +65,9 @@ extern int islocked; int luaB_opentests (lua_State *L); -#undef lua_userinit -#define lua_userinit(L) { luaopen_stdlibs(L); luaB_opentests(L); } +#ifdef lua_c +#define luaopen_stdlibs(L) { (luaopen_stdlibs)(L); luaB_opentests(L); } +#endif diff --git a/luaconf.h b/luaconf.h index 6d3d34f8..2bccf671 100644 --- a/luaconf.h +++ b/luaconf.h @@ -1,5 +1,5 @@ /* -** $Id: luaconf.h,v 1.23 2005/01/04 12:46:04 roberto Exp roberto $ +** $Id: luaconf.h,v 1.24 2005/01/07 20:00:33 roberto Exp roberto $ ** Configuration file for Lua ** See Copyright Notice in lua.h */ @@ -108,16 +108,6 @@ #define PROGNAME "lua" -/* -** this macro allows you to open other libraries when starting the -** stand-alone interpreter -*/ -#define lua_userinit(L) luaopen_stdlibs(L) -/* -** #define lua_userinit(L) { int luaopen_mylibs(lua_State *L); \ -** luaopen_stdlibs(L); luaopen_mylibs(L); } -*/ - /* diff --git a/lualib.h b/lualib.h index 24a3c7bf..5c0bf255 100644 --- a/lualib.h +++ b/lualib.h @@ -1,5 +1,5 @@ /* -** $Id: lualib.h,v 1.31 2004/07/09 14:29:29 roberto Exp roberto $ +** $Id: lualib.h,v 1.32 2004/07/09 15:47:48 roberto Exp roberto $ ** Lua standard libraries ** See Copyright Notice in lua.h */ @@ -16,32 +16,32 @@ #define LUA_COLIBNAME "coroutine" -LUALIB_API int luaopen_base (lua_State *L); +LUALIB_API int (luaopen_base) (lua_State *L); #define LUA_TABLIBNAME "table" -LUALIB_API int luaopen_table (lua_State *L); +LUALIB_API int (luaopen_table) (lua_State *L); #define LUA_IOLIBNAME "io" -LUALIB_API int luaopen_io (lua_State *L); +LUALIB_API int (luaopen_io) (lua_State *L); #define LUA_OSLIBNAME "os" -LUALIB_API int luaopen_os (lua_State *L); +LUALIB_API int (luaopen_os) (lua_State *L); #define LUA_STRLIBNAME "string" -LUALIB_API int luaopen_string (lua_State *L); +LUALIB_API int (luaopen_string) (lua_State *L); #define LUA_MATHLIBNAME "math" -LUALIB_API int luaopen_math (lua_State *L); +LUALIB_API int (luaopen_math) (lua_State *L); #define LUA_DBLIBNAME "debug" -LUALIB_API int luaopen_debug (lua_State *L); +LUALIB_API int (luaopen_debug) (lua_State *L); -LUALIB_API int luaopen_loadlib (lua_State *L); +LUALIB_API int (luaopen_loadlib) (lua_State *L); /* open all previous libraries */ -LUALIB_API int luaopen_stdlibs (lua_State *L); +LUALIB_API int (luaopen_stdlibs) (lua_State *L); #endif