aboutsummaryrefslogtreecommitdiff
path: root/lstate.c
diff options
context:
space:
mode:
Diffstat (limited to 'lstate.c')
-rw-r--r--lstate.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lstate.c b/lstate.c
index 98190c22..40b3dc27 100644
--- a/lstate.c
+++ b/lstate.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.c,v 1.70 2001/10/25 19:14:14 roberto Exp roberto $ 2** $Id: lstate.c,v 1.71 2001/10/31 19:58:11 roberto Exp $
3** Global State 3** Global State
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -39,7 +39,7 @@ static void f_luaopen (lua_State *L, void *ud) {
39 else 39 else
40 so->stacksize += LUA_MINSTACK; 40 so->stacksize += LUA_MINSTACK;
41 if (so->L != NULL) { /* shared global state? */ 41 if (so->L != NULL) { /* shared global state? */
42 L->G = G(so->L); 42 L->_G = G(so->L);
43 L->gt = so->L->gt; /* share table of globals */ 43 L->gt = so->L->gt; /* share table of globals */
44 so->L->next->previous = L; /* insert L into linked list */ 44 so->L->next->previous = L; /* insert L into linked list */
45 L->next = so->L->next; 45 L->next = so->L->next;
@@ -48,7 +48,7 @@ static void f_luaopen (lua_State *L, void *ud) {
48 luaD_init(L, so->stacksize); /* init stack */ 48 luaD_init(L, so->stacksize); /* init stack */
49 } 49 }
50 else { /* create a new global state */ 50 else { /* create a new global state */
51 L->G = luaM_new(L, global_State); 51 L->_G = luaM_new(L, global_State);
52 G(L)->strt.size = 0; 52 G(L)->strt.size = 0;
53 G(L)->strt.nuse = 0; 53 G(L)->strt.nuse = 0;
54 G(L)->strt.hash = NULL; 54 G(L)->strt.hash = NULL;
@@ -81,7 +81,7 @@ LUA_API lua_State *lua_newthread (lua_State *OL, int stacksize) {
81 if (OL) lua_lock(OL); 81 if (OL) lua_lock(OL);
82 L = luaM_new(OL, lua_State); 82 L = luaM_new(OL, lua_State);
83 if (L) { /* allocation OK? */ 83 if (L) { /* allocation OK? */
84 L->G = NULL; 84 L->_G = NULL;
85 L->stack = NULL; 85 L->stack = NULL;
86 L->stacksize = 0; 86 L->stacksize = 0;
87 L->ci = &L->basefunc; 87 L->ci = &L->basefunc;
@@ -121,7 +121,7 @@ static void close_state (lua_State *L, lua_State *OL) {
121 luaS_freeall(L); 121 luaS_freeall(L);
122 luaM_freearray(L, G(L)->TMtable, G(L)->sizeTM, struct TM); 122 luaM_freearray(L, G(L)->TMtable, G(L)->sizeTM, struct TM);
123 luaM_freearray(L, G(L)->Mbuffer, G(L)->Mbuffsize, l_char); 123 luaM_freearray(L, G(L)->Mbuffer, G(L)->Mbuffsize, l_char);
124 luaM_freelem(NULL, L->G); 124 luaM_freelem(NULL, L->_G);
125 } 125 }
126 luaM_freearray(OL, L->stack, L->stacksize, TObject); 126 luaM_freearray(OL, L->stack, L->stacksize, TObject);
127 luaM_freelem(OL, L); 127 luaM_freelem(OL, L);