Showing the changes to src/lcode.c (1 of 10 files). Show all
Unified · Split
| @@ -1,5 +1,5 @@ | ||
| 1 | 1 | /* |
| 2 | −** $Id: lcode.c,v 2.97 2014/11/24 14:59:22 roberto Exp $ | |
| 2 | +** $Id: lcode.c,v 2.98 2014/12/19 13:36:32 roberto Exp $ | |
| 3 | 3 | ** Code generator for Lua |
| 4 | 4 | ** See Copyright Notice in lua.h |
| 5 | 5 | */ |
| @@ -761,12 +761,8 @@ void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k) { · 755 unmodified lines | ||
| 761 | 761 | ** return false if folding can raise an error |
| 762 | 762 | */ |
| 763 | 763 | static int validop (int op, TValue *v1, TValue *v2) { |
| 764 | − lua_Number a, b; | |
| 765 | 764 | lua_Integer i; |
| 766 | − cast_void(a); cast_void(b); /* macro may not use its arguments */ | |
| 767 | − if (luai_numinvalidop(op, (cast_void(tonumber(v1, &a)), a), | |
| 768 | − (cast_void(tonumber(v2, &b)), b))) | |
| 769 | − return 0; | |
| 765 | + if (luai_numinvalidop(op, nvalue(v1), nvalue(v2))) return 0; | |
| 770 | 766 | switch (op) { |
| 771 | 767 | case LUA_OPBAND: case LUA_OPBOR: case LUA_OPBXOR: |
| 772 | 768 | case LUA_OPSHL: case LUA_OPSHR: case LUA_OPBNOT: /* conversion errors */ |