summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-11-07 21:16:31 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-11-07 21:16:31 (GMT)
commitaf07dcfdda71f77e6aa038ebd63630d04d53414e (patch)
tree38eb78bcd816b69417199d15b281cc49268be63e
parent44ce8c245fa83b3cc8733db27a99b24bdca732fb (diff)
parent82a4bb8618f4a8672fd62a895fa355c1a0628b88 (diff)
downloadtcl-af07dcfdda71f77e6aa038ebd63630d04d53414e.zip
tcl-af07dcfdda71f77e6aa038ebd63630d04d53414e.tar.gz
tcl-af07dcfdda71f77e6aa038ebd63630d04d53414e.tar.bz2
Merge 8.7
-rw-r--r--generic/tclCompCmdsGR.c30
-rw-r--r--generic/tclCompile.c2
-rw-r--r--generic/tclDisassemble.c2
3 files changed, 17 insertions, 17 deletions
diff --git a/generic/tclCompCmdsGR.c b/generic/tclCompCmdsGR.c
index efa36ad..c86d369 100644
--- a/generic/tclCompCmdsGR.c
+++ b/generic/tclCompCmdsGR.c
@@ -95,7 +95,7 @@ TclCompileGlobalCmd(
int localIndex, numWords, i;
/* TODO: Consider support for compiling expanded args. */
- numWords = (int)parsePtr->numWords;
+ numWords = parsePtr->numWords;
if (numWords < 2) {
return TCL_ERROR;
}
@@ -196,7 +196,7 @@ TclCompileIfCmd(
tokenPtr = parsePtr->tokenPtr;
wordIdx = 0;
- numWords = (int)parsePtr->numWords;
+ numWords = parsePtr->numWords;
for (wordIdx = 0; wordIdx < numWords; wordIdx++) {
if (tokenPtr->type != TCL_TOKEN_SIMPLE_WORD) {
@@ -847,7 +847,7 @@ TclCompileLappendCmd(
int isScalar, localIndex, numWords, i;
/* TODO: Consider support for compiling expanded args. */
- numWords = (int)parsePtr->numWords;
+ numWords = parsePtr->numWords;
if (numWords < 3) {
return TCL_ERROR;
}
@@ -961,7 +961,7 @@ TclCompileLassignCmd(
Tcl_Token *tokenPtr;
int isScalar, localIndex, numWords, idx;
- numWords = (int)parsePtr->numWords;
+ numWords = parsePtr->numWords;
/*
* Check for command syntax error, but we'll punt that to runtime.
@@ -1062,7 +1062,7 @@ TclCompileLindexCmd(
{
DefineLineInformation; /* TIP #280 */
Tcl_Token *idxTokenPtr, *valTokenPtr;
- int i, idx, numWords = (int)parsePtr->numWords;
+ int i, idx, numWords = parsePtr->numWords;
/*
* Quit if not enough args.
@@ -1169,7 +1169,7 @@ TclCompileListCmd(
* implement with a simple push.
*/
- numWords = (int)parsePtr->numWords;
+ numWords = parsePtr->numWords;
valueTokenPtr = TokenAfter(parsePtr->tokenPtr);
TclNewObj(listObj);
for (i = 1; i < numWords && listObj != NULL; i++) {
@@ -1192,7 +1192,7 @@ TclCompileListCmd(
* Push the all values onto the stack.
*/
- numWords = (int)parsePtr->numWords;
+ numWords = parsePtr->numWords;
valueTokenPtr = TokenAfter(parsePtr->tokenPtr);
concat = build = 0;
for (i = 1; i < numWords; i++) {
@@ -1362,7 +1362,7 @@ TclCompileLinsertCmd(
if ((int)parsePtr->numWords < 3) {
return TCL_ERROR;
}
-
+
/* Push list, insertion index onto the stack */
tokenPtr = TokenAfter(parsePtr->tokenPtr);
CompileWord(envPtr, tokenPtr, interp, 1);
@@ -1377,7 +1377,7 @@ TclCompileLinsertCmd(
/* First operand is count of arguments */
TclEmitInstInt4(INST_LREPLACE4, parsePtr->numWords - 1, envPtr);
- /*
+ /*
* Second operand is bitmask
* TCL_LREPLACE4_END_IS_LAST - end refers to last element
* TCL_LREPLACE4_SINGLE_INDEX - second index is not present
@@ -1424,14 +1424,14 @@ TclCompileLreplaceCmd(
CompileWord(envPtr, tokenPtr, interp, 3);
/* Push new elements to be inserted */
- for (i=4 ; i< (int) parsePtr->numWords ; i++) {
+ for (i=4 ; i< (int)parsePtr->numWords ; i++) {
tokenPtr = TokenAfter(tokenPtr);
CompileWord(envPtr, tokenPtr, interp, i);
}
/* First operand is count of arguments */
TclEmitInstInt4(INST_LREPLACE4, parsePtr->numWords - 1, envPtr);
- /*
+ /*
* Second operand is bitmask
* TCL_LREPLACE4_END_IS_LAST - end refers to last element
*/
@@ -1966,7 +1966,7 @@ TclCompileRegexpCmd(
sawLast++;
i++;
break;
- } else if ((len > 1) && (strncmp(str,"-nocase", len) == 0)) {
+ } else if ((len > 1) && (strncmp(str, "-nocase", len) == 0)) {
nocase = 1;
} else {
/*
@@ -2269,7 +2269,7 @@ TclCompileReturnCmd(
*/
int level, code, objc, status = TCL_OK;
size_t size;
- int numWords = (int)parsePtr->numWords;
+ int numWords = parsePtr->numWords;
int explicitResult = (0 == (numWords % 2));
int numOptionWords = numWords - 1 - explicitResult;
Tcl_Obj *returnOpts, **objv;
@@ -2523,7 +2523,7 @@ TclCompileUpvarCmd(
return TCL_ERROR;
}
- numWords = (int)parsePtr->numWords;
+ numWords = parsePtr->numWords;
if (numWords < 3) {
return TCL_ERROR;
}
@@ -2624,7 +2624,7 @@ TclCompileVariableCmd(
Tcl_Token *varTokenPtr, *valueTokenPtr;
int localIndex, numWords, i;
- numWords = (int)parsePtr->numWords;
+ numWords = parsePtr->numWords;
if (numWords < 2) {
return TCL_ERROR;
}
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index b38a657..1ce6d8e 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -660,7 +660,7 @@ InstructionDesc const tclInstructionTable[] = {
{"lreplace4", 6, INT_MIN, 2, {OPERAND_UINT4, OPERAND_UINT1}},
/* Operands: number of arguments, flags
* flags: Combination of TCL_LREPLACE4_* flags
- * Stack: ... listobj index1 ?index2? new1 ... newN => ... newlistobj
+ * Stack: ... listobj index1 ?index2? new1 ... newN => ... newlistobj
* where index2 is present only if TCL_LREPLACE_SINGLE_INDEX is not
* set in flags.
*/
diff --git a/generic/tclDisassemble.c b/generic/tclDisassemble.c
index 8fd90a3..536d016 100644
--- a/generic/tclDisassemble.c
+++ b/generic/tclDisassemble.c
@@ -832,7 +832,7 @@ UpdateStringOfInstName(
InstNameGetInternalRep(objPtr, inst);
- if (inst > LAST_INST_OPCODE) {
+ if (inst >= LAST_INST_OPCODE) {
dst = Tcl_InitStringRep(objPtr, NULL, TCL_INTEGER_SPACE + 5);
TclOOM(dst, TCL_INTEGER_SPACE + 5);
sprintf(dst, "inst_%" TCL_Z_MODIFIER "u", inst);