浏览代码

use macro 'hasjumps' to test whether expression has jumps...

Roberto Ierusalimschy 9 年之前
父节点
当前提交
82129b9266
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      lcode.c

+ 2 - 2
lcode.c

@@ -1,5 +1,5 @@
 /*
 /*
-** $Id: lcode.c,v 2.100 2015/03/28 19:14:47 roberto Exp roberto $
+** $Id: lcode.c,v 2.101 2015/04/29 18:24:11 roberto Exp roberto $
 ** Code generator for Lua
 ** Code generator for Lua
 ** See Copyright Notice in lua.h
 ** See Copyright Notice in lua.h
 */
 */
@@ -37,7 +37,7 @@
 
 
 
 
 static int tonumeral(expdesc *e, TValue *v) {
 static int tonumeral(expdesc *e, TValue *v) {
-  if (e->t != NO_JUMP || e->f != NO_JUMP)
+  if (hasjumps(e))
     return 0;  /* not a numeral */
     return 0;  /* not a numeral */
   switch (e->k) {
   switch (e->k) {
     case VKINT:
     case VKINT: