aboutsummaryrefslogtreecommitdiff
path: root/lstate.c
diff options
context:
space:
mode:
Diffstat (limited to 'lstate.c')
-rw-r--r--lstate.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lstate.c b/lstate.c
index 66fffbc9..dc2827c3 100644
--- a/lstate.c
+++ b/lstate.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.c,v 2.38 2006/08/15 19:59:20 roberto Exp roberto $ 2** $Id: lstate.c,v 2.39 2006/09/11 14:07:24 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*/
@@ -95,7 +95,7 @@ static void preinit_state (lua_State *L, global_State *g) {
95 L->openupval = NULL; 95 L->openupval = NULL;
96 L->size_ci = 0; 96 L->size_ci = 0;
97 L->baseCcalls = 0; 97 L->baseCcalls = 0;
98 L->status = 0; 98 L->status = LUA_OK;
99 L->base_ci = L->ci = NULL; 99 L->base_ci = L->ci = NULL;
100 L->savedpc = NULL; 100 L->savedpc = NULL;
101 L->errfunc = 0; 101 L->errfunc = 0;
@@ -189,7 +189,7 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) {
189 g->gcstepmul = LUAI_GCMUL; 189 g->gcstepmul = LUAI_GCMUL;
190 g->gcdept = 0; 190 g->gcdept = 0;
191 for (i=0; i<NUM_TAGS; i++) g->mt[i] = NULL; 191 for (i=0; i<NUM_TAGS; i++) g->mt[i] = NULL;
192 if (luaD_rawrunprotected(L, f_luaopen, NULL) != 0) { 192 if (luaD_rawrunprotected(L, f_luaopen, NULL) != LUA_OK) {
193 /* memory allocation error: free partial state */ 193 /* memory allocation error: free partial state */
194 close_state(L); 194 close_state(L);
195 L = NULL; 195 L = NULL;
@@ -216,7 +216,7 @@ LUA_API void lua_close (lua_State *L) {
216 L->ci = L->base_ci; 216 L->ci = L->base_ci;
217 L->base = L->top = L->ci->base; 217 L->base = L->top = L->ci->base;
218 G(L)->nCcalls = 0; 218 G(L)->nCcalls = 0;
219 } while (luaD_rawrunprotected(L, callallgcTM, NULL) != 0); 219 } while (luaD_rawrunprotected(L, callallgcTM, NULL) != LUA_OK);
220 lua_assert(G(L)->tmudata == NULL); 220 lua_assert(G(L)->tmudata == NULL);
221 luai_userstateclose(L); 221 luai_userstateclose(L);
222 close_state(L); 222 close_state(L);