diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-06-09 20:25:18 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-06-09 20:25:18 (GMT) |
commit | 3c3ebea4105cc63a1cc3bf80c6796f0f662f0ec3 (patch) | |
tree | f461e773e0aa5f52b5b51a36b165225cd7e65ad4 /generic/tclStringObj.c | |
parent | d307130311321b2d327d13669905d9873b5863d3 (diff) | |
parent | 8c311313a11ad2b7caa8a3626b03fb16da985df6 (diff) | |
download | tcl-3c3ebea4105cc63a1cc3bf80c6796f0f662f0ec3.zip tcl-3c3ebea4105cc63a1cc3bf80c6796f0f662f0ec3.tar.gz tcl-3c3ebea4105cc63a1cc3bf80c6796f0f662f0ec3.tar.bz2 |
Merge 9.0
Diffstat (limited to 'generic/tclStringObj.c')
-rw-r--r-- | generic/tclStringObj.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 9f048d3..694a9f0 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -509,7 +509,7 @@ int TclCheckEmptyString( Tcl_Obj *objPtr) { - int length = -1; + size_t length = TCL_INDEX_NONE; if (objPtr->bytes == &tclEmptyString) { return TCL_EMPTYSTRING_YES; @@ -1840,12 +1840,12 @@ Tcl_AppendFormatToObj( Tcl_Interp *interp, Tcl_Obj *appendObj, const char *format, - int objc, + size_t objc, Tcl_Obj *const objv[]) { const char *span = format, *msg, *errCode; - int objIndex = 0, gotXpg = 0, gotSequential = 0; - size_t originalLength, limit, numBytes = 0; + int gotXpg = 0, gotSequential = 0; + size_t objIndex = 0, originalLength, limit, numBytes = 0; Tcl_UniChar ch = 0; static const char *mixedXPG = "cannot mix \"%\" and \"%n$\" conversion specifiers"; @@ -1937,7 +1937,7 @@ Tcl_AppendFormatToObj( } gotSequential = 1; } - if ((objIndex < 0) || (objIndex >= objc)) { + if (objIndex >= objc) { msg = badIndex[gotXpg]; errCode = gotXpg ? "INDEXRANGE" : "FIELDVARMISMATCH"; goto errorMsg; @@ -2609,7 +2609,7 @@ Tcl_Obj * Tcl_Format( Tcl_Interp *interp, const char *format, - int objc, + size_t objc, Tcl_Obj *const objv[]) { int result; @@ -2642,7 +2642,8 @@ AppendPrintfToObjVA( const char *format, va_list argList) { - int code, objc; + int code; + size_t objc; Tcl_Obj **objv, *list; const char *p; |