History

Lua 5.3.0-rc2

Lua Team committed 11 years ago

Commit f4a97271 parent 396021810 files · +37 −31Browse files

Showing the changes to src/lcode.c (1 of 10 files). Show all

Unified · Split

src/lcode.c+2−6
@@ -1,5 +1,5 @@
11 /*
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 $
33 ** Code generator for Lua
44 ** See Copyright Notice in lua.h
55 */
@@ -761,12 +761,8 @@ void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k) { · 755 unmodified lines
761761 ** return false if folding can raise an error
762762 */
763763 static int validop (int op, TValue *v1, TValue *v2) {
764− lua_Number a, b;
765764 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;
770766 switch (op) {
771767 case LUA_OPBAND: case LUA_OPBOR: case LUA_OPBXOR:
772768 case LUA_OPSHL: case LUA_OPSHR: case LUA_OPBNOT: /* conversion errors */