diff options
| -rw-r--r-- | lvm.c | 6 |
1 files changed, 2 insertions, 4 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lvm.c,v 1.185 2001/06/15 19:17:17 roberto Exp roberto $ | 2 | ** $Id: lvm.c,v 1.186 2001/06/15 20:36:57 roberto Exp roberto $ |
| 3 | ** Lua virtual machine | 3 | ** Lua virtual machine |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -224,7 +224,6 @@ void luaV_setglobal (lua_State *L, TString *name, StkId val) { | |||
| 224 | 224 | ||
| 225 | static int call_binTM (lua_State *L, const TObject *p1, const TObject *p2, | 225 | static int call_binTM (lua_State *L, const TObject *p1, const TObject *p2, |
| 226 | TObject *res, TMS event) { | 226 | TObject *res, TMS event) { |
| 227 | TString *opname; | ||
| 228 | Closure *tm = luaT_gettmbyObj(G(L), p1, event); /* try first operand */ | 227 | Closure *tm = luaT_gettmbyObj(G(L), p1, event); /* try first operand */ |
| 229 | if (tm == NULL) { | 228 | if (tm == NULL) { |
| 230 | tm = luaT_gettmbyObj(G(L), p2, event); /* try second operand */ | 229 | tm = luaT_gettmbyObj(G(L), p2, event); /* try second operand */ |
| @@ -234,8 +233,7 @@ static int call_binTM (lua_State *L, const TObject *p1, const TObject *p2, | |||
| 234 | return 0; /* no tag method */ | 233 | return 0; /* no tag method */ |
| 235 | } | 234 | } |
| 236 | } | 235 | } |
| 237 | opname = luaS_new(L, luaT_eventname[event]); | 236 | setTMresult(L, res, callTM(L, tm, l_s("oo"), p1, p2)); |
| 238 | setTMresult(L, res, callTM(L, tm, l_s("oos"), p1, p2, opname)); | ||
| 239 | return 1; | 237 | return 1; |
| 240 | } | 238 | } |
| 241 | 239 | ||
