From 6cf85dcc900c71687678bc316164142e76df7385 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 5 May 2005 12:34:03 -0300 Subject: metatables for all types --- lstate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lstate.c') diff --git a/lstate.c b/lstate.c index 872156ea..8bcd14fe 100644 --- a/lstate.c +++ b/lstate.c @@ -1,5 +1,5 @@ /* -** $Id: lstate.c,v 2.29 2005/04/05 13:41:29 roberto Exp roberto $ +** $Id: lstate.c,v 2.30 2005/04/05 15:57:59 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -141,6 +141,7 @@ void luaE_freethread (lua_State *L, lua_State *L1) { LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) { + int i; lua_State *L; global_State *g; void *l = (*f)(ud, NULL, 0, state_size(LG)); @@ -177,6 +178,7 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) { g->gcpause = LUAI_GCPAUSE; g->gcstepmul = LUAI_GCMUL; g->gcdept = 0; + for (i=0; imt[i] = NULL; if (luaD_rawrunprotected(L, f_luaopen, NULL) != 0) { /* memory allocation error: free partial state */ close_state(L); -- cgit v1.2.3-55-g6feb