diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-10-30 21:34:02 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-10-30 21:34:02 (GMT) |
commit | 5ae87ec20df1d7c0029694f15837f9634117a5b8 (patch) | |
tree | 6e21bb4b7df5f14e1fe55cd0dabb8e45767bc960 /generic/tclExecute.c | |
parent | 24a5107484c12a34a855d444aa9b8e26b4ec252a (diff) | |
parent | e52ace05d39636e857f167ed51382cbfbbd22687 (diff) | |
download | tcl-5ae87ec20df1d7c0029694f15837f9634117a5b8.zip tcl-5ae87ec20df1d7c0029694f15837f9634117a5b8.tar.gz tcl-5ae87ec20df1d7c0029694f15837f9634117a5b8.tar.bz2 |
Merge 8.6
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r-- | generic/tclExecute.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 476806b..1bcedff 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -8067,7 +8067,7 @@ ExecuteExtendedBinaryMathOp( Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); /* TODO: internals intrusion */ - if ((w1 > ((Tcl_WideInt) 0)) ^ (big2.sign == MP_ZPOS)) { + if ((w1 > ((Tcl_WideInt) 0)) ^ !mp_isneg(&big2)) { /* * Arguments are opposite sign; remainder is sum. */ @@ -8116,7 +8116,7 @@ ExecuteExtendedBinaryMathOp( break; case TCL_NUMBER_BIG: Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); - invalid = big2.sign != MP_ZPOS; + invalid = mp_isneg(&big2); mp_clear(&big2); break; default: @@ -8195,7 +8195,7 @@ ExecuteExtendedBinaryMathOp( break; case TCL_NUMBER_BIG: Tcl_TakeBignumFromObj(NULL, valuePtr, &big1); - zero = (big1.sign == MP_ZPOS); + zero = !mp_isneg(&big1); mp_clear(&big1); break; default: @@ -8319,7 +8319,7 @@ ExecuteExtendedBinaryMathOp( oddExponent = (int) (w2 & (Tcl_WideInt)1); } else { Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); - negativeExponent = big2.sign != MP_ZPOS; + negativeExponent = mp_isneg(&big2); mp_mod_2d(&big2, 1, &big2); oddExponent = big2.used != 0; mp_clear(&big2); @@ -8794,7 +8794,7 @@ TclCompareTwoNumbers( goto wideCompare; case TCL_NUMBER_BIG: Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); - if (big2.sign != MP_ZPOS) { + if (mp_isneg(&big2)) { compare = MP_GT; } else { compare = MP_LT; @@ -8831,7 +8831,7 @@ TclCompareTwoNumbers( } Tcl_TakeBignumFromObj(NULL, value2Ptr, &big2); if ((d1 < (double)WIDE_MAX) && (d1 > (double)WIDE_MIN)) { - if (big2.sign != MP_ZPOS) { + if (mp_isneg(&big2)) { compare = MP_GT; } else { compare = MP_LT; |