diff options
Diffstat (limited to 'lvm.c')
| -rw-r--r-- | lvm.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -125,7 +125,7 @@ void luaV_gettable (lua_State *L, StkId t, TObject *key, StkId res) { | |||
| 125 | const TObject *tm; | 125 | const TObject *tm; |
| 126 | init: | 126 | init: |
| 127 | if (ttype(t) == LUA_TTABLE) { /* `t' is a table? */ | 127 | if (ttype(t) == LUA_TTABLE) { /* `t' is a table? */ |
| 128 | Table *et = hvalue(t)->eventtable; | 128 | Table *et = hvalue(t)->metatable; |
| 129 | if ((tm = fasttm(L, et, TM_GETTABLE)) == NULL) { /* no gettable TM? */ | 129 | if ((tm = fasttm(L, et, TM_GETTABLE)) == NULL) { /* no gettable TM? */ |
| 130 | const TObject *h = luaH_get(hvalue(t), key); /* do a primitive get */ | 130 | const TObject *h = luaH_get(hvalue(t), key); /* do a primitive get */ |
| 131 | /* result is no nil or there is no `index' tag method? */ | 131 | /* result is no nil or there is no `index' tag method? */ |
| @@ -158,7 +158,7 @@ void luaV_settable (lua_State *L, StkId t, TObject *key, StkId val) { | |||
| 158 | const TObject *tm; | 158 | const TObject *tm; |
| 159 | init: | 159 | init: |
| 160 | if (ttype(t) == LUA_TTABLE) { /* `t' is a table? */ | 160 | if (ttype(t) == LUA_TTABLE) { /* `t' is a table? */ |
| 161 | Table *et = hvalue(t)->eventtable; | 161 | Table *et = hvalue(t)->metatable; |
| 162 | if ((tm = fasttm(L, et, TM_SETTABLE)) == NULL) { /* no TM? */ | 162 | if ((tm = fasttm(L, et, TM_SETTABLE)) == NULL) { /* no TM? */ |
| 163 | luaH_set(L, hvalue(t), key, val); /* do a primitive set */ | 163 | luaH_set(L, hvalue(t), key, val); /* do a primitive set */ |
| 164 | return; | 164 | return; |
