aboutsummaryrefslogtreecommitdiff
path: root/ltm.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltm.c')
-rw-r--r--ltm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ltm.c b/ltm.c
index ef023528..dc5db074 100644
--- a/ltm.c
+++ b/ltm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltm.c,v 2.3 2004/04/30 20:13:38 roberto Exp roberto $ 2** $Id: ltm.c,v 2.4 2005/03/08 18:00:16 roberto Exp roberto $
3** Tag methods 3** Tag methods
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -32,7 +32,7 @@ void luaT_init (lua_State *L) {
32 "__index", "__newindex", 32 "__index", "__newindex",
33 "__gc", "__mode", "__eq", 33 "__gc", "__mode", "__eq",
34 "__add", "__sub", "__mul", "__div", "__mod", 34 "__add", "__sub", "__mul", "__div", "__mod",
35 "__pow", "__unm", "__lt", "__le", 35 "__pow", "__unm", "__siz", "__lt", "__le",
36 "__concat", "__call" 36 "__concat", "__call"
37 }; 37 };
38 int i; 38 int i;
@@ -68,8 +68,8 @@ const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event) {
68 mt = uvalue(o)->metatable; 68 mt = uvalue(o)->metatable;
69 break; 69 break;
70 default: 70 default:
71 mt = NULL; 71 mt = G(L)->mt[ttype(o)];
72 } 72 }
73 return (mt ? luaH_getstr(mt, G(L)->tmname[event]) : &luaO_nilobject); 73 return (mt ? luaH_getstr(mt, G(L)->tmname[event]) : &luaO_nilobject);
74} 74}
75 75