diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-11-04 12:10:54 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-11-04 12:10:54 (GMT) |
| commit | 2b8429142401960e12bcece0205061dd68071ded (patch) | |
| tree | a3561a9d8e8c9b868ed9b209b444e7f78e8d38d3 /generic/tclUtil.c | |
| parent | efe1dce70b548e0af9d8a0e0e6cffbca6faa2cb5 (diff) | |
| parent | 493585e80285a37fffbfa04f560a2d37a94d3322 (diff) | |
| download | tcl-2b8429142401960e12bcece0205061dd68071ded.zip tcl-2b8429142401960e12bcece0205061dd68071ded.tar.gz tcl-2b8429142401960e12bcece0205061dd68071ded.tar.bz2 | |
Merge 8.7
Diffstat (limited to 'generic/tclUtil.c')
| -rw-r--r-- | generic/tclUtil.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 5eaea4a..4b58fad 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -3345,13 +3345,13 @@ Tcl_PrintDouble( * the first (the recommended zero value for tcl_precision avoids the * problem entirely). * - * Uncomment TCL_DD_SHORTEN_FLAG in the next call to prefer the method + * Uncomment TCL_DD_SHORTEST in the next call to prefer the method * that allows floating point values to be shortened if it can be done * without loss of precision. */ digits = TclDoubleDigits(value, *precisionPtr, - TCL_DD_E_FORMAT /* | TCL_DD_SHORTEN_FLAG */, + TCL_DD_E_FORMAT /* | TCL_DD_SHORTEST */, &exponent, &signum, &end); } if (signum) { @@ -3728,7 +3728,7 @@ GetWideForIndex( /* objPtr holds an integer outside the signed wide range */ /* Truncate to the signed wide range. */ - *widePtr = (((mp_int *)cd)->sign != MP_ZPOS) ? WIDE_MIN : WIDE_MAX; + *widePtr = ((mp_isneg((mp_int *)cd)) ? WIDE_MIN : WIDE_MAX); return TCL_OK; } @@ -3841,7 +3841,7 @@ GetWideForIndex( } else { /* sum holds an integer outside the signed wide range */ /* Truncate to the signed wide range. */ - if (((mp_int *)cd)->sign != MP_ZPOS) { + if (mp_isneg((mp_int *)cd)) { *widePtr = WIDE_MIN; } else { *widePtr = WIDE_MAX; @@ -3988,7 +3988,7 @@ GetEndOffsetFromObj( if (t == TCL_NUMBER_BIG) { /* Truncate to the signed wide range. */ - if (((mp_int *)cd)->sign != MP_ZPOS) { + if (mp_isneg((mp_int *)cd)) { offset = (bytes[3] == '-') ? WIDE_MAX : WIDE_MIN; } else { offset = (bytes[3] == '-') ? WIDE_MIN : WIDE_MAX; |
