aboutsummaryrefslogtreecommitdiff
path: root/lstate.c
diff options
context:
space:
mode:
Diffstat (limited to 'lstate.c')
-rw-r--r--lstate.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/lstate.c b/lstate.c
index 85357c00..5049c753 100644
--- a/lstate.c
+++ b/lstate.c
@@ -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
27lua_State *lua_state = NULL;
28
29
30lua_State *lua_newstate (int stacksize, int put_builtin) { 25lua_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
73extern lua_State *lua_state;
74
78void lua_close (lua_State *L) { 75void 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");