aboutsummaryrefslogtreecommitdiff
path: root/ltm.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltm.c')
-rw-r--r--ltm.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ltm.c b/ltm.c
index 54762902..6b28ea63 100644
--- a/ltm.c
+++ b/ltm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltm.c,v 1.92 2002/05/27 20:35:40 roberto Exp roberto $ 2** $Id: ltm.c,v 1.93 2002/06/03 14:09:57 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*/
@@ -28,8 +28,8 @@ void luaT_init (lua_State *L) {
28 "__gettable", "__settable", "__index", "__newindex", 28 "__gettable", "__settable", "__index", "__newindex",
29 "__gc", "__weakmode", 29 "__gc", "__weakmode",
30 "__add", "__sub", "__mul", "__div", 30 "__add", "__sub", "__mul", "__div",
31 "__pow", "__unm", "__lt", "__concat", 31 "__pow", "__unm", "__lt", "__le",
32 "__call" 32 "__concat", "__call"
33 }; 33 };
34 int i; 34 int i;
35 for (i=0; i<TM_N; i++) { 35 for (i=0; i<TM_N; i++) {
@@ -45,6 +45,7 @@ void luaT_init (lua_State *L) {
45*/ 45*/
46const TObject *luaT_gettm (Table *events, TMS event, TString *ename) { 46const TObject *luaT_gettm (Table *events, TMS event, TString *ename) {
47 const TObject *tm = luaH_getstr(events, ename); 47 const TObject *tm = luaH_getstr(events, ename);
48 lua_assert(event <= TM_WEAKMODE);
48 if (ttype(tm) == LUA_TNIL) { /* no tag method? */ 49 if (ttype(tm) == LUA_TNIL) { /* no tag method? */
49 events->flags |= (1u<<event); /* cache this fact */ 50 events->flags |= (1u<<event); /* cache this fact */
50 return NULL; 51 return NULL;