summaryrefslogtreecommitdiffstats
path: root/generic/tclObj.c
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2023-04-19 04:45:14 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2023-04-19 04:45:14 (GMT)
commit2f2003c490a8324229ef5d9fa9eb298f3d836000 (patch)
tree229f4d4bd07aa84f44a4b0d6301964b28b0a9ecf /generic/tclObj.c
parenta9974c36d092201f528c8b8272ed47a2811e6ce7 (diff)
parentb98b8f9181336b09931ec33f4f5e6451913de654 (diff)
downloadtcl-2f2003c490a8324229ef5d9fa9eb298f3d836000.zip
tcl-2f2003c490a8324229ef5d9fa9eb298f3d836000.tar.gz
tcl-2f2003c490a8324229ef5d9fa9eb298f3d836000.tar.bz2
Merge 8.7
Diffstat (limited to 'generic/tclObj.c')
-rw-r--r--generic/tclObj.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c
index aeaa0cd..93e3a08 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -1751,11 +1751,7 @@ TclGetStringFromObj(
}
}
if (lengthPtr != NULL) {
-#if TCL_MAJOR_VERSION > 8
- *lengthPtr = objPtr->length;
-#else
- *lengthPtr = ((size_t)(unsigned)(objPtr->length + 1)) - 1;
-#endif
+ *lengthPtr = ((ptrdiff_t)(unsigned)(objPtr->length + 1)) - 1;
}
return objPtr->bytes;
}
@@ -4081,7 +4077,7 @@ Tcl_GetNumber(
numBytes = 0;
}
if (numBytes < 0) {
- numBytes = strlen(bytes);
+ numBytes = (ptrdiff_t)strlen(bytes);
}
if (numBytes > INT_MAX) {
if (interp) {