summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2019-05-10 18:32:09 (GMT)
committersebres <sebres@users.sourceforge.net>2019-05-10 18:32:09 (GMT)
commit0d1ffc0968e6c82da985d876f63a92a1159a9a3b (patch)
tree9676da16c8a96bb597ed82d64e7ac0e76757ab1a
parentb1139d3d2099aad8ad1981deaa0f689e1b4c322a (diff)
downloadtcl-0d1ffc0968e6c82da985d876f63a92a1159a9a3b.zip
tcl-0d1ffc0968e6c82da985d876f63a92a1159a9a3b.tar.gz
tcl-0d1ffc0968e6c82da985d876f63a92a1159a9a3b.tar.bz2
testlinkarray: fixed cast to pointer from integer (and eliminate warning)
-rw-r--r--generic/tclTest.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 5fe1370..8476ecb 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -3327,10 +3327,7 @@ TestlinkarrayCmd(
};
int optionIndex, typeIndex, readonly, i, size, length;
char *name, *arg;
- long addr; /* Wrong on Windows, but that's MS's fault for
- * not supporting <stdint.h> correctly. They
- * can suffer the warnings; the rest of us
- * shouldn't have to! */
+ Tcl_WideInt addr;
if (objc < 2) {
Tcl_WrongNumArgs(interp, 1, objv, "option args");
@@ -3388,7 +3385,7 @@ TestlinkarrayCmd(
*/
if (i < objc) {
- if (Tcl_GetLongFromObj(interp, objv[i], &addr) == TCL_ERROR) {
+ if (Tcl_GetWideIntFromObj(interp, objv[i], &addr) == TCL_ERROR) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"wrong address value", -1));
return TCL_ERROR;
@@ -3396,7 +3393,7 @@ TestlinkarrayCmd(
} else {
addr = 0;
}
- return Tcl_LinkArray(interp, name, (void *) addr,
+ return Tcl_LinkArray(interp, name, INT2PTR(addr),
LinkTypes[typeIndex] | readonly, size);
}
return TCL_OK;