From d20ff60615c3839ee14dd35c7aef0ca084fc24b4 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 12 Apr 2010 13:07:29 -0300 Subject: new macro LUA_NUMTAGS --- lstate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lstate.c') diff --git a/lstate.c b/lstate.c index 0d88c960..6be44a9b 100644 --- a/lstate.c +++ b/lstate.c @@ -1,5 +1,5 @@ /* -** $Id: lstate.c,v 2.77 2010/04/05 16:35:37 roberto Exp roberto $ +** $Id: lstate.c,v 2.78 2010/04/08 17:16:46 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -268,7 +268,7 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) { g->totalbytes = sizeof(LG); g->gcpause = LUAI_GCPAUSE; g->gcstepmul = LUAI_GCMUL; - for (i=0; imt[i] = NULL; + for (i=0; i < LUA_NUMTAGS; i++) g->mt[i] = NULL; if (luaD_rawrunprotected(L, f_luaopen, NULL) != LUA_OK) { /* memory allocation error: free partial state */ close_state(L); -- cgit v1.2.3-55-g6feb