diff options
Diffstat (limited to 'src/ltm.c')
-rw-r--r-- | src/ltm.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1,5 +1,5 @@ /* -** $Id: ltm.c,v 2.3 2004/04/30 20:13:38 roberto Exp $ +** $Id: ltm.c,v 2.5 2005/05/05 15:34:03 roberto Exp $ ** Tag methods ** See Copyright Notice in lua.h */ @@ -31,8 +31,8 @@ void luaT_init (lua_State *L) { static const char *const luaT_eventname[] = { /* ORDER TM */ "__index", "__newindex", "__gc", "__mode", "__eq", - "__add", "__sub", "__mul", "__div", - "__pow", "__unm", "__lt", "__le", + "__add", "__sub", "__mul", "__div", "__mod", + "__pow", "__unm", "__siz", "__lt", "__le", "__concat", "__call" }; int i; @@ -68,8 +68,8 @@ const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event) { mt = uvalue(o)->metatable; break; default: - mt = NULL; + mt = G(L)->mt[ttype(o)]; } - return (mt ? luaH_getstr(mt, G(L)->tmname[event]) : &luaO_nilobject); + return (mt ? luaH_getstr(mt, G(L)->tmname[event]) : &luaO_nilobject); } |