diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-05-04 14:25:19 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-05-04 14:25:19 -0300 |
| commit | fde866e303b3a470517931e24e4d853a627fdb08 (patch) | |
| tree | 000565c5a050ace29a3c30606a626128709205a0 | |
| parent | 2d7a81a204400aca4c3869d80dc1e761b8c6dc2f (diff) | |
| download | lua-fde866e303b3a470517931e24e4d853a627fdb08.tar.gz lua-fde866e303b3a470517931e24e4d853a627fdb08.tar.bz2 lua-fde866e303b3a470517931e24e4d853a627fdb08.zip | |
details (comments)
| -rw-r--r-- | lvm.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lvm.c,v 2.114 2010/04/18 13:22:48 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 2.115 2010/04/19 17:58:46 roberto Exp roberto $ |
| 3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -106,7 +106,7 @@ void luaV_gettable (lua_State *L, const TValue *t, TValue *key, StkId val) { | |||
| 106 | if (ttistable(t)) { /* `t' is a table? */ | 106 | if (ttistable(t)) { /* `t' is a table? */ |
| 107 | Table *h = hvalue(t); | 107 | Table *h = hvalue(t); |
| 108 | const TValue *res = luaH_get(h, key); /* do a primitive get */ | 108 | const TValue *res = luaH_get(h, key); /* do a primitive get */ |
| 109 | if (!ttisnil(res) || /* result is no nil? */ | 109 | if (!ttisnil(res) || /* result is not nil? */ |
| 110 | (tm = fasttm(L, h->metatable, TM_INDEX)) == NULL) { /* or no TM? */ | 110 | (tm = fasttm(L, h->metatable, TM_INDEX)) == NULL) { /* or no TM? */ |
| 111 | setobj2s(L, val, res); | 111 | setobj2s(L, val, res); |
| 112 | return; | 112 | return; |
| @@ -133,7 +133,7 @@ void luaV_settable (lua_State *L, const TValue *t, TValue *key, StkId val) { | |||
| 133 | if (ttistable(t)) { /* `t' is a table? */ | 133 | if (ttistable(t)) { /* `t' is a table? */ |
| 134 | Table *h = hvalue(t); | 134 | Table *h = hvalue(t); |
| 135 | TValue *oldval = luaH_set(L, h, key); /* do a primitive set */ | 135 | TValue *oldval = luaH_set(L, h, key); /* do a primitive set */ |
| 136 | if (!ttisnil(oldval) || /* result is no nil? */ | 136 | if (!ttisnil(oldval) || /* result is not nil? */ |
| 137 | (tm = fasttm(L, h->metatable, TM_NEWINDEX)) == NULL) { /* or no TM? */ | 137 | (tm = fasttm(L, h->metatable, TM_NEWINDEX)) == NULL) { /* or no TM? */ |
| 138 | setobj2t(L, oldval, val); | 138 | setobj2t(L, oldval, val); |
| 139 | luaC_barriert(L, h, val); | 139 | luaC_barriert(L, h, val); |
