summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-03-29 17:57:28 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-03-29 17:57:28 (GMT)
commit67857c0b6ef1d96293f412a3908f7076afecb8d6 (patch)
tree050f7582a6ff9dda231f51d273127de8043194f3 /generic/tclCompile.c
parent3cd9927e9bf6f937e8cd932675df66c01011c8ed (diff)
downloadtcl-67857c0b6ef1d96293f412a3908f7076afecb8d6.zip
tcl-67857c0b6ef1d96293f412a3908f7076afecb8d6.tar.gz
tcl-67857c0b6ef1d96293f412a3908f7076afecb8d6.tar.bz2
Minor code cleanup: More use of size_t where possible, and elimination of unneeded type-casts.
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r--generic/tclCompile.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index 486b98f..019b5b1 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -677,8 +677,8 @@ static void StartExpanding(CompileEnv *envPtr);
* commands.
*/
static void EnterCmdWordData(ExtCmdLoc *eclPtr, int srcOffset,
- Tcl_Token *tokenPtr, const char *cmd, int len,
- int numWords, int line, int *clNext, int **lines,
+ Tcl_Token *tokenPtr, const char *cmd,
+ size_t numWords, int line, int *clNext, int **lines,
CompileEnv *envPtr);
static void ReleaseCmdWordData(ExtCmdLoc *eclPtr);
@@ -1769,7 +1769,7 @@ TclWordKnownAtCompileTime(
static int
ExpandRequested(
Tcl_Token *tokenPtr,
- int numWords)
+ size_t numWords)
{
/* Determine whether any words of the command require expansion */
while (numWords--) {
@@ -1811,10 +1811,11 @@ TclCompileInvocation(
Tcl_Interp *interp,
Tcl_Token *tokenPtr,
Tcl_Obj *cmdObj,
- int numWords,
+ size_t numWords,
CompileEnv *envPtr)
{
- int wordIdx = 0, depth = TclGetStackDepth(envPtr);
+ size_t wordIdx = 0;
+ int depth = TclGetStackDepth(envPtr);
DefineLineInformation;
if (cmdObj) {
@@ -2029,7 +2030,7 @@ CompileCommandTokens(
EnterCmdWordData(eclPtr, parsePtr->commandStart - envPtr->source,
parsePtr->tokenPtr, parsePtr->commandStart,
- parsePtr->commandSize, parsePtr->numWords, cmdLine,
+ parsePtr->numWords, cmdLine,
clNext, &wlines, envPtr);
wlineat = eclPtr->nuloc - 1;
@@ -3238,8 +3239,7 @@ EnterCmdWordData(
int srcOffset, /* Offset of first char of the command. */
Tcl_Token *tokenPtr,
const char *cmd,
- int len,
- int numWords,
+ size_t numWords,
int line,
int *clNext,
int **wlines,
@@ -3247,7 +3247,8 @@ EnterCmdWordData(
{
ECL *ePtr;
const char *last;
- int wordIdx, wordLine, *wwlines, *wordNext;
+ size_t wordIdx;
+ int wordLine, *wwlines, *wordNext;
if (eclPtr->nuloc >= eclPtr->nloc) {
/*