From 617008f5521030d0a99432efda5af0ef705f25c9 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 6 Nov 2001 19:40:51 -0200 Subject: field G renamed to _G to avoid problemas with bugged macro-systems (there is a macro named G too) --- lstate.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lstate.c') diff --git a/lstate.c b/lstate.c index 98190c22..40b3dc27 100644 --- a/lstate.c +++ b/lstate.c @@ -1,5 +1,5 @@ /* -** $Id: lstate.c,v 1.70 2001/10/25 19:14:14 roberto Exp roberto $ +** $Id: lstate.c,v 1.71 2001/10/31 19:58:11 roberto Exp $ ** Global State ** See Copyright Notice in lua.h */ @@ -39,7 +39,7 @@ static void f_luaopen (lua_State *L, void *ud) { else so->stacksize += LUA_MINSTACK; if (so->L != NULL) { /* shared global state? */ - L->G = G(so->L); + L->_G = G(so->L); L->gt = so->L->gt; /* share table of globals */ so->L->next->previous = L; /* insert L into linked list */ L->next = so->L->next; @@ -48,7 +48,7 @@ static void f_luaopen (lua_State *L, void *ud) { luaD_init(L, so->stacksize); /* init stack */ } else { /* create a new global state */ - L->G = luaM_new(L, global_State); + L->_G = luaM_new(L, global_State); G(L)->strt.size = 0; G(L)->strt.nuse = 0; G(L)->strt.hash = NULL; @@ -81,7 +81,7 @@ LUA_API lua_State *lua_newthread (lua_State *OL, int stacksize) { if (OL) lua_lock(OL); L = luaM_new(OL, lua_State); if (L) { /* allocation OK? */ - L->G = NULL; + L->_G = NULL; L->stack = NULL; L->stacksize = 0; L->ci = &L->basefunc; @@ -121,7 +121,7 @@ static void close_state (lua_State *L, lua_State *OL) { luaS_freeall(L); luaM_freearray(L, G(L)->TMtable, G(L)->sizeTM, struct TM); luaM_freearray(L, G(L)->Mbuffer, G(L)->Mbuffsize, l_char); - luaM_freelem(NULL, L->G); + luaM_freelem(NULL, L->_G); } luaM_freearray(OL, L->stack, L->stacksize, TObject); luaM_freelem(OL, L); -- cgit v1.2.3-55-g6feb