diff options
author | Chip Salzenberg <salzench@dun.nielsen.com> | 1996-02-09 11:57:37 -0500 |
---|---|---|
committer | Andy Dougherty <doughera@lafcol.lafayette.edu> | 1996-02-09 11:57:37 -0500 |
commit | 6f45a1d401152a2c8202b58306cc112de4c9bafe (patch) | |
tree | 44de2c9abc2b21d9667ad5eac5a4f04cd0663910 /op.c | |
parent | b5d6801ce0a12d57fa490a927220b17df44df8a4 (diff) | |
download | perl-6f45a1d401152a2c8202b58306cc112de4c9bafe.tar.gz |
Beta3/Gamma: URGENT patch for integerized comparisons [edited]
[next note is from Andy]
[ This didn't apply cleanly to my source. If I delete the (int)
casts in the first part of the patch, it does apply cleanly. I worry
about that a little, but I put in the patch anyway. --AD ]
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -1424,8 +1424,12 @@ register OP *o; if (curop->op_type == OP_PADSV || curop->op_type == OP_RV2SV) { if (vars++) return o; - if (o->op_type >= OP_LT && o->op_type <= OP_NCMP) - continue; /* allow $i < 10000 to integerize */ + if ((o->op_type == OP_LT && curop == ((BINOP*)o)->op_first) || + (o->op_type == OP_GT && curop == ((BINOP*)o)->op_last)) + { + /* Allow "$i < 100" and "100 > $i" to integerize */ + continue; + } } return o; } |