diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-08-09 16:16:57 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2000-08-09 16:16:57 -0300 |
| commit | e238efc5367a8d88757dd84df0683e1d8d9f9211 (patch) | |
| tree | c460226a60d7598193fa4fe87d1736d80bd5bfab /lstate.c | |
| parent | fdd04e7a7f624dad1a1443e08193241dea935287 (diff) | |
| download | lua-e238efc5367a8d88757dd84df0683e1d8d9f9211.tar.gz lua-e238efc5367a8d88757dd84df0683e1d8d9f9211.tar.bz2 lua-e238efc5367a8d88757dd84df0683e1d8d9f9211.zip | |
default now is multi-state
Diffstat (limited to 'lstate.c')
| -rw-r--r-- | lstate.c | 9 |
1 files changed, 3 insertions, 6 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstate.c,v 1.30 2000/08/04 19:38:35 roberto Exp roberto $ | 2 | ** $Id: lstate.c,v 1.31 2000/08/08 20:42:07 roberto Exp roberto $ |
| 3 | ** Global State | 3 | ** Global State |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -7,8 +7,6 @@ | |||
| 7 | 7 | ||
| 8 | #include <stdarg.h> | 8 | #include <stdarg.h> |
| 9 | 9 | ||
| 10 | #define LUA_REENTRANT | ||
| 11 | |||
| 12 | #include "lua.h" | 10 | #include "lua.h" |
| 13 | 11 | ||
| 14 | #include "lauxlib.h" | 12 | #include "lauxlib.h" |
| @@ -24,9 +22,6 @@ | |||
| 24 | #include "ltm.h" | 22 | #include "ltm.h" |
| 25 | 23 | ||
| 26 | 24 | ||
| 27 | lua_State *lua_state = NULL; | ||
| 28 | |||
| 29 | |||
| 30 | lua_State *lua_newstate (int stacksize, int put_builtin) { | 25 | lua_State *lua_newstate (int stacksize, int put_builtin) { |
| 31 | struct lua_longjmp myErrorJmp; | 26 | struct lua_longjmp myErrorJmp; |
| 32 | lua_State *L = luaM_new(NULL, lua_State); | 27 | lua_State *L = luaM_new(NULL, lua_State); |
| @@ -75,6 +70,8 @@ lua_State *lua_newstate (int stacksize, int put_builtin) { | |||
| 75 | } | 70 | } |
| 76 | 71 | ||
| 77 | 72 | ||
| 73 | extern lua_State *lua_state; | ||
| 74 | |||
| 78 | void lua_close (lua_State *L) { | 75 | void lua_close (lua_State *L) { |
| 79 | luaC_collect(L, 1); /* collect all elements */ | 76 | luaC_collect(L, 1); /* collect all elements */ |
| 80 | LUA_ASSERT(L->rootproto == NULL, "list should be empty"); | 77 | LUA_ASSERT(L->rootproto == NULL, "list should be empty"); |
