From 9756f56354af72d62b4f63c85000d4ae1db6b130 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 5 Nov 2009 15:43:54 -0200 Subject: better control over accesses to TValue fields --- ltable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ltable.c') diff --git a/ltable.c b/ltable.c index 826dd194..9b964156 100644 --- a/ltable.c +++ b/ltable.c @@ -1,5 +1,5 @@ /* -** $Id: ltable.c,v 2.41 2009/08/07 17:53:28 roberto Exp roberto $ +** $Id: ltable.c,v 2.42 2009/10/23 12:31:12 roberto Exp roberto $ ** Lua tables (hash) ** See Copyright Notice in lua.h */ @@ -418,7 +418,7 @@ static TValue *newkey (lua_State *L, Table *t, const TValue *key) { mp = n; } } - gkey(mp)->value = key->value; gkey(mp)->tt = key->tt; + setnodekey(mp, key); luaC_barriert(L, t, key); lua_assert(ttisnil(gval(mp))); return gval(mp); -- cgit v1.2.3-55-g6feb