diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-02-16 16:52:52 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-02-16 16:52:52 (GMT) |
commit | d36751c671764d5351700a2ca73e18f78bd6aae8 (patch) | |
tree | b23d01d9c62430861484d209b16f06346ba443ab /generic/tclObj.c | |
parent | 8fc3f4f2157ac13b2ae1ecd90329697069d33b27 (diff) | |
parent | c9599e745ab10316ab4bb48c8d129ce9f5cee15b (diff) | |
download | tcl-d36751c671764d5351700a2ca73e18f78bd6aae8.zip tcl-d36751c671764d5351700a2ca73e18f78bd6aae8.tar.gz tcl-d36751c671764d5351700a2ca73e18f78bd6aae8.tar.bz2 |
Merge 8.6
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r-- | generic/tclObj.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c index 16a95cd..4ac9936 100644 --- a/generic/tclObj.c +++ b/generic/tclObj.c @@ -3054,7 +3054,7 @@ Tcl_GetLongFromObj( if (w >= (Tcl_WideInt)(LONG_MIN) && w <= (Tcl_WideInt)(ULONG_MAX)) { - *longPtr = (long) w; + *longPtr = (long)w; return TCL_OK; } goto tooLarge; @@ -3090,12 +3090,12 @@ Tcl_GetLongFromObj( } if (big.sign) { if (value <= 1 + (unsigned long)LONG_MAX) { - *longPtr = - (long) value; + *longPtr = (long)(-value); return TCL_OK; } } else { if (value <= (unsigned long)ULONG_MAX) { - *longPtr = (long) value; + *longPtr = (long)value; return TCL_OK; } } @@ -3329,12 +3329,12 @@ Tcl_GetWideIntFromObj( } if (big.sign) { if (value <= 1 + ~(Tcl_WideUInt)WIDE_MIN) { - *wideIntPtr = - (Tcl_WideInt) value; + *wideIntPtr = (Tcl_WideInt)(-value); return TCL_OK; } } else { if (value <= (Tcl_WideUInt)WIDE_MAX) { - *wideIntPtr = (Tcl_WideInt) value; + *wideIntPtr = (Tcl_WideInt)value; return TCL_OK; } } @@ -3800,7 +3800,7 @@ Tcl_SetBignumObj( goto tooLargeForWide; } if (bignumValue->sign) { - TclSetIntObj(objPtr, -(Tcl_WideInt)value); + TclSetIntObj(objPtr, (Tcl_WideInt)(-value)); } else { TclSetIntObj(objPtr, (Tcl_WideInt)value); } |