diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-06-08 10:23:13 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-06-08 10:23:13 (GMT) |
| commit | 8ef685ede6f3371073dfb6f84eff77b62398787c (patch) | |
| tree | fd4894d3b57bc034901dff8f04b0b9b465057ce1 /generic/tclEncoding.c | |
| parent | aa312430e34a7bd58cddb79b7dd6840e86ced518 (diff) | |
| parent | bdccbf1c921b2158d107e97cc64b72ab81a05ee5 (diff) | |
| download | tcl-8ef685ede6f3371073dfb6f84eff77b62398787c.zip tcl-8ef685ede6f3371073dfb6f84eff77b62398787c.tar.gz tcl-8ef685ede6f3371073dfb6f84eff77b62398787c.tar.bz2 | |
TIP #616: Tcl lists > 2^31 elements
Diffstat (limited to 'generic/tclEncoding.c')
| -rw-r--r-- | generic/tclEncoding.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index c760807..4d7da25 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -368,7 +368,7 @@ int Tcl_SetEncodingSearchPath( Tcl_Obj *searchPath) { - int dummy; + size_t dummy; if (TCL_ERROR == TclListObjLengthM(NULL, searchPath, &dummy)) { return TCL_ERROR; @@ -415,7 +415,7 @@ void TclSetLibraryPath( Tcl_Obj *path) { - int dummy; + size_t dummy; if (TCL_ERROR == TclListObjLengthM(NULL, path, &dummy)) { return; @@ -451,7 +451,7 @@ TclSetLibraryPath( static void FillEncodingFileMap(void) { - int i, numDirs = 0; + size_t i, numDirs = 0; Tcl_Obj *map, *searchPath; searchPath = Tcl_GetEncodingSearchPath(); @@ -460,13 +460,13 @@ FillEncodingFileMap(void) map = Tcl_NewDictObj(); Tcl_IncrRefCount(map); - for (i = numDirs-1; i >= 0; i--) { + for (i = numDirs-1; i != TCL_INDEX_NONE; i--) { /* * Iterate backwards through the search path so as we overwrite * entries found, we favor files earlier on the search path. */ - int j, numFiles; + size_t j, numFiles; Tcl_Obj *directory, *matchFileList; Tcl_Obj **filev; Tcl_GlobTypeData readableFiles = { @@ -1553,7 +1553,7 @@ OpenEncodingFileChannel( Tcl_Obj *map = TclGetProcessGlobalValue(&encodingFileMap); Tcl_Obj **dir, *path, *directory = NULL; Tcl_Channel chan = NULL; - int i, numDirs; + size_t i, numDirs; TclListObjGetElementsM(NULL, searchPath, &numDirs, &dir); Tcl_IncrRefCount(nameObj); @@ -2054,7 +2054,7 @@ LoadEscapeEncoding( Tcl_DStringInit(&escapeData); while (1) { - int argc; + size_t argc; const char **argv; char *line; Tcl_DString lineString; @@ -3930,7 +3930,7 @@ InitializeEncodingSearchPath( Tcl_Encoding *encodingPtr) { const char *bytes; - int i, numDirs; + size_t i, numDirs; size_t numBytes; Tcl_Obj *libPathObj, *encodingObj, *searchPathObj; |
