summaryrefslogtreecommitdiffstats
path: root/generic/tclBinary.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-06-16 12:32:49 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-06-16 12:32:49 (GMT)
commitc44181ecafaa160b94728593527ebca0260dc51f (patch)
tree0ec29da0c538b7360a29c01ede019832d514d796 /generic/tclBinary.c
parent14994d8a856c6e59890aad6023793a6760c98e1a (diff)
parent824f6218752373b6a11e1e9dfaa7d7f2eedc6c42 (diff)
downloadtcl-c44181ecafaa160b94728593527ebca0260dc51f.zip
tcl-c44181ecafaa160b94728593527ebca0260dc51f.tar.gz
tcl-c44181ecafaa160b94728593527ebca0260dc51f.tar.bz2
Change signature of Tcl_GetRange() to use size_t. Merge trunk.
Diffstat (limited to 'generic/tclBinary.c')
-rw-r--r--generic/tclBinary.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/generic/tclBinary.c b/generic/tclBinary.c
index 2814d4a..acc8fa5 100644
--- a/generic/tclBinary.c
+++ b/generic/tclBinary.c
@@ -752,9 +752,9 @@ TclAppendBytesToByteArray(
}
if (ptr == NULL) {
/* Try to allocate double the increment that is needed (plus). */
- unsigned int limit = INT_MAX - needed;
- unsigned int extra = len + TCL_MIN_GROWTH;
- int growth = (int) ((extra > limit) ? limit : extra);
+ size_t limit = INT_MAX - needed;
+ size_t extra = len + TCL_MIN_GROWTH;
+ size_t growth = (extra > limit) ? limit : extra;
attempt = needed + growth;
ptr = attemptckrealloc(byteArrayPtr, BYTEARRAY_SIZE(attempt));
@@ -2513,8 +2513,8 @@ BinaryDecodeHex(
badChar:
TclDecrRefCount(resultObj);
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "invalid hexadecimal digit \"%c\" at position %d",
- c, (int) (data - datastart - 1)));
+ "invalid hexadecimal digit \"%c\" at position %td",
+ c, data - datastart - 1));
return TCL_ERROR;
}
@@ -2915,8 +2915,8 @@ BinaryDecodeUu(
badUu:
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "invalid uuencode character \"%c\" at position %d",
- c, (int) (data - datastart - 1)));
+ "invalid uuencode character \"%c\" at position %td",
+ c, data - datastart - 1));
Tcl_SetErrorCode(interp, "TCL", "BINARY", "DECODE", "INVALID", NULL);
TclDecrRefCount(resultObj);
return TCL_ERROR;
@@ -3065,8 +3065,8 @@ BinaryDecode64(
bad64:
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "invalid base64 character \"%c\" at position %d",
- (char) c, (int) (data - datastart - 1)));
+ "invalid base64 character \"%c\" at position %td",
+ (char) c, data - datastart - 1));
TclDecrRefCount(resultObj);
return TCL_ERROR;
}