diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-11-05 15:43:54 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-11-05 15:43:54 -0200 |
commit | 9756f56354af72d62b4f63c85000d4ae1db6b130 (patch) | |
tree | 93d9ddf16bf75b75be809611f7d11e046bfb6927 /ltable.c | |
parent | b7d5f18d71f691df752e220f844ea613a8f6d722 (diff) | |
download | lua-9756f56354af72d62b4f63c85000d4ae1db6b130.tar.gz lua-9756f56354af72d62b4f63c85000d4ae1db6b130.tar.bz2 lua-9756f56354af72d62b4f63c85000d4ae1db6b130.zip |
better control over accesses to TValue fields
Diffstat (limited to 'ltable.c')
-rw-r--r-- | ltable.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ltable.c,v 2.41 2009/08/07 17:53:28 roberto Exp roberto $ | 2 | ** $Id: ltable.c,v 2.42 2009/10/23 12:31:12 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 | */ |
@@ -418,7 +418,7 @@ static TValue *newkey (lua_State *L, Table *t, const TValue *key) { | |||
418 | mp = n; | 418 | mp = n; |
419 | } | 419 | } |
420 | } | 420 | } |
421 | gkey(mp)->value = key->value; gkey(mp)->tt = key->tt; | 421 | setnodekey(mp, key); |
422 | luaC_barriert(L, t, key); | 422 | luaC_barriert(L, t, key); |
423 | lua_assert(ttisnil(gval(mp))); | 423 | lua_assert(ttisnil(gval(mp))); |
424 | return gval(mp); | 424 | return gval(mp); |