Skip to content

Commit 69c0f5a

Browse files
author
dgp
committed
The "numTokens" field of Tcl_Token is now type Tcl_Size.
Propagate that change through the code.
1 parent 6aac4d3 commit 69c0f5a

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

generic/tclCompCmds.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3414,10 +3414,11 @@ TclPushVarName(
34143414
{
34153415
const char *p;
34163416
const char *last, *name, *elName;
3417-
int n;
3417+
Tcl_Size n;
34183418
Tcl_Token *elemTokenPtr = NULL;
34193419
int nameLen, elNameLen, simpleVarName, localIndex;
3420-
int elemTokenCount = 0, allocedTokens = 0, removedParen = 0;
3420+
Tcl_Size elemTokenCount = 0, removedParen = 0;
3421+
int allocedTokens = 0;
34213422

34223423
/*
34233424
* Decide if we can use a frame slot for the var/array name or if we need

generic/tclCompile.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2397,14 +2397,14 @@ TclCompileTokens(
23972397
Tcl_Interp *interp, /* Used for error and status reporting. */
23982398
Tcl_Token *tokenPtr, /* Pointer to first in an array of tokens to
23992399
* compile. */
2400-
int count, /* Number of tokens to consider at tokenPtr.
2400+
Tcl_Size count, /* Number of tokens to consider at tokenPtr.
24012401
* Must be at least 1. */
24022402
CompileEnv *envPtr) /* Holds the resulting instructions. */
24032403
{
24042404
Tcl_DString textBuffer; /* Holds concatenated chars from adjacent
24052405
* TCL_TOKEN_TEXT, TCL_TOKEN_BS tokens. */
24062406
char buffer[4] = "";
2407-
int i, numObjsToConcat, adjust;
2407+
Tcl_Size i, numObjsToConcat, adjust;
24082408
int length;
24092409
unsigned char *entryCodeNext = envPtr->codeNext;
24102410
#define NUM_STATIC_POS 20
@@ -2614,7 +2614,7 @@ TclCompileCmdWord(
26142614
Tcl_Interp *interp, /* Used for error and status reporting. */
26152615
Tcl_Token *tokenPtr, /* Pointer to first in an array of tokens for
26162616
* a command word to compile inline. */
2617-
int count, /* Number of tokens to consider at tokenPtr.
2617+
Tcl_Size count, /* Number of tokens to consider at tokenPtr.
26182618
* Must be at least 1. */
26192619
CompileEnv *envPtr) /* Holds the resulting instructions. */
26202620
{

generic/tclCompile.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,7 @@ MODULE_SCOPE int TclAttemptCompileProc(Tcl_Interp *interp,
10991099
MODULE_SCOPE void TclCleanupStackForBreakContinue(CompileEnv *envPtr,
11001100
ExceptionAux *auxPtr);
11011101
MODULE_SCOPE void TclCompileCmdWord(Tcl_Interp *interp,
1102-
Tcl_Token *tokenPtr, int count,
1102+
Tcl_Token *tokenPtr, Tcl_Size count,
11031103
CompileEnv *envPtr);
11041104
MODULE_SCOPE void TclCompileExpr(Tcl_Interp *interp, const char *script,
11051105
Tcl_Size numBytes, CompileEnv *envPtr, int optimize);
@@ -1115,7 +1115,7 @@ MODULE_SCOPE void TclCompileScript(Tcl_Interp *interp,
11151115
MODULE_SCOPE void TclCompileSyntaxError(Tcl_Interp *interp,
11161116
CompileEnv *envPtr);
11171117
MODULE_SCOPE void TclCompileTokens(Tcl_Interp *interp,
1118-
Tcl_Token *tokenPtr, int count,
1118+
Tcl_Token *tokenPtr, Tcl_Size count,
11191119
CompileEnv *envPtr);
11201120
MODULE_SCOPE void TclCompileVarSubst(Tcl_Interp *interp,
11211121
Tcl_Token *tokenPtr, CompileEnv *envPtr);

0 commit comments

Comments
 (0)