diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-11-22 11:12:07 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1999-11-22 11:12:07 -0200 |
commit | 29ede6aa13144ff7b69c57a87be1ee93f57ae896 (patch) | |
tree | adcfb5dcff7db55481cd675349e23dec0e63c939 /lualib.h | |
parent | 951897c09319ae5474a4b86bb7d615136577caa0 (diff) | |
download | lua-29ede6aa13144ff7b69c57a87be1ee93f57ae896.tar.gz lua-29ede6aa13144ff7b69c57a87be1ee93f57ae896.tar.bz2 lua-29ede6aa13144ff7b69c57a87be1ee93f57ae896.zip |
first implementation of multiple states (reentrant code).
Diffstat (limited to 'lualib.h')
-rw-r--r-- | lualib.h | 33 |
1 files changed, 21 insertions, 12 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lualib.h,v 1.6 1999/05/05 19:23:11 roberto Exp roberto $ | 2 | ** $Id: lualib.h,v 1.7 1999/08/16 20:52:00 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 | */ |
@@ -10,27 +10,36 @@ | |||
10 | 10 | ||
11 | #include "lua.h" | 11 | #include "lua.h" |
12 | 12 | ||
13 | void lua_iolibopen (void); | 13 | void lua_iolibopen (lua_State *L); |
14 | void lua_strlibopen (void); | 14 | void lua_strlibopen (lua_State *L); |
15 | void lua_mathlibopen (void); | 15 | void lua_mathlibopen (lua_State *L); |
16 | void lua_dblibopen (void); | 16 | void lua_dblibopen (lua_State *L); |
17 | 17 | ||
18 | 18 | ||
19 | void lua_userinit (void); | 19 | void lua_userinit (lua_State *L); |
20 | 20 | ||
21 | 21 | ||
22 | /* To keep compatibility with old versions */ | 22 | /* |
23 | ** =============================================================== | ||
24 | ** Macros for single-state use | ||
25 | ** =============================================================== | ||
26 | */ | ||
27 | |||
28 | #ifndef LUA_REENTRANT | ||
23 | 29 | ||
24 | #define iolib_open lua_iolibopen | 30 | #define lua_iolibopen() (lua_iolibopen)(lua_state) |
25 | #define strlib_open lua_strlibopen | 31 | #define lua_strlibopen() (lua_strlibopen)(lua_state) |
26 | #define mathlib_open lua_mathlibopen | 32 | #define lua_mathlibopen() (lua_mathlibopen)(lua_state) |
33 | #define lua_dblibopen() (lua_dblibopen)(lua_state) | ||
34 | #define lua_userinit() (lua_userinit)(lua_state) | ||
35 | |||
36 | #endif | ||
27 | 37 | ||
28 | 38 | ||
29 | 39 | ||
30 | /* Auxiliary functions (private) */ | 40 | /* Auxiliary functions (private) */ |
31 | 41 | ||
32 | const char *luaI_classend (const char *p); | 42 | const char *luaI_classend (lua_State *L, const char *p); |
33 | int luaI_singlematch (int c, const char *p, const char *ep); | 43 | int luaI_singlematch (int c, const char *p, const char *ep); |
34 | 44 | ||
35 | #endif | 45 | #endif |
36 | |||