diff options
| -rw-r--r-- | linit.c | 18 | ||||
| -rw-r--r-- | lualib.h | 10 |
2 files changed, 13 insertions, 15 deletions
| @@ -1,22 +1,20 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: linit.c,v 1.3 1999/12/06 11:43:09 roberto Exp roberto $ | 2 | ** $Id: linit.c,v 1.4 2000/06/12 13:52:05 roberto Exp roberto $ |
| 3 | ** Initialization of libraries for lua.c | 3 | ** Initialization of libraries for lua.c |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | #define LUA_REENTRANT | ||
| 8 | |||
| 9 | #include "lua.h" | 7 | #include "lua.h" |
| 10 | 8 | ||
| 11 | #include "lualib.h" | 9 | #include "lualib.h" |
| 12 | 10 | ||
| 13 | 11 | ||
| 14 | void lua_userinit (lua_State *L) { | 12 | void lua_userinit (void) { |
| 15 | lua_beginblock(L); | 13 | lua_beginblock(); |
| 16 | lua_iolibopen(L); | 14 | lua_iolibopen(); |
| 17 | lua_strlibopen(L); | 15 | lua_strlibopen(); |
| 18 | lua_mathlibopen(L); | 16 | lua_mathlibopen(); |
| 19 | lua_dblibopen(L); | 17 | lua_dblibopen(); |
| 20 | lua_endblock(L); | 18 | lua_endblock(); |
| 21 | } | 19 | } |
| 22 | 20 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lualib.h,v 1.7 1999/08/16 20:52:00 roberto Exp roberto $ | 2 | ** $Id: lualib.h,v 1.8 1999/11/22 13:12:07 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,12 +16,10 @@ void lua_mathlibopen (lua_State *L); | |||
| 16 | void lua_dblibopen (lua_State *L); | 16 | void lua_dblibopen (lua_State *L); |
| 17 | 17 | ||
| 18 | 18 | ||
| 19 | void lua_userinit (lua_State *L); | ||
| 20 | |||
| 21 | 19 | ||
| 22 | /* | 20 | /* |
| 23 | ** =============================================================== | 21 | ** =============================================================== |
| 24 | ** Macros for single-state use | 22 | ** Macros (and functions) for single-state use |
| 25 | ** =============================================================== | 23 | ** =============================================================== |
| 26 | */ | 24 | */ |
| 27 | 25 | ||
| @@ -31,7 +29,9 @@ void lua_userinit (lua_State *L); | |||
| 31 | #define lua_strlibopen() (lua_strlibopen)(lua_state) | 29 | #define lua_strlibopen() (lua_strlibopen)(lua_state) |
| 32 | #define lua_mathlibopen() (lua_mathlibopen)(lua_state) | 30 | #define lua_mathlibopen() (lua_mathlibopen)(lua_state) |
| 33 | #define lua_dblibopen() (lua_dblibopen)(lua_state) | 31 | #define lua_dblibopen() (lua_dblibopen)(lua_state) |
| 34 | #define lua_userinit() (lua_userinit)(lua_state) | 32 | |
| 33 | /* this function should be used only in single-state mode */ | ||
| 34 | void lua_userinit (void); | ||
| 35 | 35 | ||
| 36 | #endif | 36 | #endif |
| 37 | 37 | ||
