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 0187c6f5..c06c8296 100644
--- a/ltm.c
+++ b/ltm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltm.c,v 2.63 2018/02/21 15:49:32 roberto Exp roberto $ 2** $Id: ltm.c,v 2.64 2018/02/23 13:13:31 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*/
@@ -70,7 +70,7 @@ const TValue *luaT_gettm (Table *events, TMS event, TString *ename) {
70 70
71const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event) { 71const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event) {
72 Table *mt; 72 Table *mt;
73 switch (ttnov(o)) { 73 switch (ttype(o)) {
74 case LUA_TTABLE: 74 case LUA_TTABLE:
75 mt = hvalue(o)->metatable; 75 mt = hvalue(o)->metatable;
76 break; 76 break;
@@ -78,7 +78,7 @@ const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, TMS event) {
78 mt = uvalue(o)->metatable; 78 mt = uvalue(o)->metatable;
79 break; 79 break;
80 default: 80 default:
81 mt = G(L)->mt[ttnov(o)]; 81 mt = G(L)->mt[ttype(o)];
82 } 82 }
83 return (mt ? luaH_getshortstr(mt, G(L)->tmname[event]) : luaO_nilobject); 83 return (mt ? luaH_getshortstr(mt, G(L)->tmname[event]) : luaO_nilobject);
84} 84}
@@ -96,7 +96,7 @@ const char *luaT_objtypename (lua_State *L, const TValue *o) {
96 if (ttisstring(name)) /* is '__name' a string? */ 96 if (ttisstring(name)) /* is '__name' a string? */
97 return getstr(tsvalue(name)); /* use it as type name */ 97 return getstr(tsvalue(name)); /* use it as type name */
98 } 98 }
99 return ttypename(ttnov(o)); /* else use standard type name */ 99 return ttypename(ttype(o)); /* else use standard type name */
100} 100}
101 101
102 102