diff options
author | apnadkarni <apnmbx-wits@yahoo.com> | 2023-07-09 14:47:22 (GMT) |
---|---|---|
committer | apnadkarni <apnmbx-wits@yahoo.com> | 2023-07-09 14:47:22 (GMT) |
commit | 7f10145e496d9a3b8973e2c9d92c606d504fa0f8 (patch) | |
tree | bec2f1328062020174ec5cd3c37e89fc8865ece5 /generic/tclCmdMZ.c | |
parent | 3edb9b417542652525dc806aed8534d0b9b258a6 (diff) | |
download | tcl-7f10145e496d9a3b8973e2c9d92c606d504fa0f8.zip tcl-7f10145e496d9a3b8973e2c9d92c606d504fa0f8.tar.gz tcl-7f10145e496d9a3b8973e2c9d92c606d504fa0f8.tar.bz2 |
Permit large scripts > INT_MAX. Not complete because compiler source line tracking still limited.
Diffstat (limited to 'generic/tclCmdMZ.c')
-rw-r--r-- | generic/tclCmdMZ.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index e6bda99..b27d3a9 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -3848,7 +3848,7 @@ TclNRSwitchObjCmd( if (ctxPtr->type == TCL_LOCATION_SOURCE && ctxPtr->line[bidx] >= 0) { int bline = ctxPtr->line[bidx]; - ctxPtr->line = (int *)Tcl_Alloc(objc * sizeof(int)); + ctxPtr->line = (Tcl_Size *)Tcl_Alloc(objc * sizeof(Tcl_Size)); ctxPtr->nline = objc; TclListLines(blist, bline, objc, ctxPtr->line, objv); } else { @@ -3862,7 +3862,7 @@ TclNRSwitchObjCmd( int k; - ctxPtr->line = (int *)Tcl_Alloc(objc * sizeof(int)); + ctxPtr->line = (Tcl_Size *)Tcl_Alloc(objc * sizeof(Tcl_Size)); ctxPtr->nline = objc; for (k=0; k < objc; k++) { ctxPtr->line[k] = -1; @@ -5302,17 +5302,17 @@ TclListLines( * structure. Assumed to be valid. Assumed to * contain n elements. */ Tcl_Size line, /* Line the list as a whole starts on. */ - int n, /* #elements in lines */ - int *lines, /* Array of line numbers, to fill. */ + Tcl_Size n, /* #elements in lines */ + Tcl_Size *lines, /* Array of line numbers, to fill. */ Tcl_Obj *const *elems) /* The list elems as Tcl_Obj*, in need of * derived continuation data */ { const char *listStr = TclGetString(listObj); const char *listHead = listStr; - int i, length = strlen(listStr); + Tcl_Size i, length = strlen(listStr); const char *element = NULL, *next = NULL; ContLineLoc *clLocPtr = TclContinuationsGet(listObj); - int *clNext = (clLocPtr ? &clLocPtr->loc[0] : NULL); + Tcl_Size *clNext = (clLocPtr ? &clLocPtr->loc[0] : NULL); for (i = 0; i < n; i++) { TclFindElement(NULL, listStr, length, &element, &next, NULL, NULL); |