aboutsummaryrefslogtreecommitdiff
path: root/ltable.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltable.c')
-rw-r--r--ltable.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/ltable.c b/ltable.c
index 64afbef9..2363d8ad 100644
--- a/ltable.c
+++ b/ltable.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltable.c,v 1.116 2002/08/06 17:06:56 roberto Exp roberto $ 2** $Id: ltable.c,v 1.117 2002/08/16 14:45:55 roberto Exp roberto $
3** Lua tables (hash) 3** Lua tables (hash)
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -27,6 +27,7 @@
27 27
28#include "ldebug.h" 28#include "ldebug.h"
29#include "ldo.h" 29#include "ldo.h"
30#include "lgc.h"
30#include "lmem.h" 31#include "lmem.h"
31#include "lobject.h" 32#include "lobject.h"
32#include "lstate.h" 33#include "lstate.h"
@@ -304,11 +305,9 @@ static void rehash (lua_State *L, Table *t) {
304 305
305Table *luaH_new (lua_State *L, int narray, int lnhash) { 306Table *luaH_new (lua_State *L, int narray, int lnhash) {
306 Table *t = luaM_new(L, Table); 307 Table *t = luaM_new(L, Table);
308 luaC_link(L, cast(GCObject *, t), LUA_TTABLE);
307 t->metatable = hvalue(defaultmeta(L)); 309 t->metatable = hvalue(defaultmeta(L));
308 t->next = G(L)->roottable;
309 G(L)->roottable = t;
310 t->flags = cast(lu_byte, ~0); 310 t->flags = cast(lu_byte, ~0);
311 t->marked = 0;
312 t->mode = 0; 311 t->mode = 0;
313 /* temporary values (kept only if some malloc fails) */ 312 /* temporary values (kept only if some malloc fails) */
314 t->array = NULL; 313 t->array = NULL;