diff options
Diffstat (limited to 'lvm.c')
| -rw-r--r-- | lvm.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lvm.c,v 1.254 2002/08/21 18:56:19 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 1.255 2002/09/19 13:03:53 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 | */ |
| @@ -134,7 +134,7 @@ static const TObject *luaV_index (lua_State *L, const TObject *t, | |||
| 134 | 134 | ||
| 135 | static const TObject *luaV_getnotable (lua_State *L, const TObject *t, | 135 | static const TObject *luaV_getnotable (lua_State *L, const TObject *t, |
| 136 | TObject *key, int loop) { | 136 | TObject *key, int loop) { |
| 137 | const TObject *tm = luaT_gettmbyobj(L, t, TM_GETTABLE); | 137 | const TObject *tm = luaT_gettmbyobj(L, t, TM_INDEX); |
| 138 | if (ttisnil(tm)) | 138 | if (ttisnil(tm)) |
| 139 | luaG_typeerror(L, t, "index"); | 139 | luaG_typeerror(L, t, "index"); |
| 140 | if (ttisfunction(tm)) { | 140 | if (ttisfunction(tm)) { |
| @@ -181,7 +181,7 @@ void luaV_settable (lua_State *L, const TObject *t, TObject *key, StkId val) { | |||
| 181 | } | 181 | } |
| 182 | /* else will try the tag method */ | 182 | /* else will try the tag method */ |
| 183 | } | 183 | } |
| 184 | else if (ttisnil(tm = luaT_gettmbyobj(L, t, TM_SETTABLE))) | 184 | else if (ttisnil(tm = luaT_gettmbyobj(L, t, TM_NEWINDEX))) |
| 185 | luaG_typeerror(L, t, "index"); | 185 | luaG_typeerror(L, t, "index"); |
| 186 | if (ttisfunction(tm)) { | 186 | if (ttisfunction(tm)) { |
| 187 | callTM(L, tm, t, key, val); | 187 | callTM(L, tm, t, key, val); |
