diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2015-10-26 12:27:47 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2015-10-26 12:27:47 -0200 |
| commit | 82129b92662d43e1a49cb63f5e42f01d098d21cf (patch) | |
| tree | 3d2b9e248d080144e504405e9127c36d416bc6f6 | |
| parent | 8004ab756fe2c9fa5da79da6d17f8e11ab7dea26 (diff) | |
| download | lua-82129b92662d43e1a49cb63f5e42f01d098d21cf.tar.gz lua-82129b92662d43e1a49cb63f5e42f01d098d21cf.tar.bz2 lua-82129b92662d43e1a49cb63f5e42f01d098d21cf.zip | |
use macro 'hasjumps' to test whether expression has jumps...
| -rw-r--r-- | lcode.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lcode.c,v 2.100 2015/03/28 19:14:47 roberto Exp roberto $ | 2 | ** $Id: lcode.c,v 2.101 2015/04/29 18:24:11 roberto Exp roberto $ |
| 3 | ** Code generator for Lua | 3 | ** Code generator for Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -37,7 +37,7 @@ | |||
| 37 | 37 | ||
| 38 | 38 | ||
| 39 | static int tonumeral(expdesc *e, TValue *v) { | 39 | static int tonumeral(expdesc *e, TValue *v) { |
| 40 | if (e->t != NO_JUMP || e->f != NO_JUMP) | 40 | if (hasjumps(e)) |
| 41 | return 0; /* not a numeral */ | 41 | return 0; /* not a numeral */ |
| 42 | switch (e->k) { | 42 | switch (e->k) { |
| 43 | case VKINT: | 43 | case VKINT: |
