summaryrefslogtreecommitdiffstats
path: root/generic/tclTest.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-04-08 12:46:35 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-04-08 12:46:35 (GMT)
commitce8fc8dc1e031e8dd27cd9196f299ecb1e21317f (patch)
tree1d432a9ec1165247f356d36000f9909aa06de6ef /generic/tclTest.c
parent82a4b8a569583a68f0c54c9f31321412cf06d709 (diff)
parentecd8e8bce1ae18281cf79ca447cbafe017127afb (diff)
downloadtcl-ce8fc8dc1e031e8dd27cd9196f299ecb1e21317f.zip
tcl-ce8fc8dc1e031e8dd27cd9196f299ecb1e21317f.tar.gz
tcl-ce8fc8dc1e031e8dd27cd9196f299ecb1e21317f.tar.bz2
Merge 8.7. Fix some indexObj testcases on 32-bit systems
Diffstat (limited to 'generic/tclTest.c')
-rw-r--r--generic/tclTest.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c
index f1b95b6..1e769af 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -7158,7 +7158,8 @@ TestGetIntForIndexCmd(
if (Tcl_GetIntForIndex(interp, objv[1], endvalue, &result) != TCL_OK) {
return TCL_ERROR;
}
- Tcl_SetObjResult(interp, Tcl_NewWideIntObj(result));
+ /* Make sure that (size_t)-2 is output as "-2" and (size_t)-3 as "-3", even for 32-bit */
+ Tcl_SetObjResult(interp, Tcl_NewWideIntObj((Tcl_WideInt)((Tcl_WideUInt)(result + 3U)) - 3));
return TCL_OK;
}