summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmds.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-03-24 22:18:04 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-03-24 22:18:04 (GMT)
commit75fffb6cb1f7ecccb2e0ab2a471bfb0628aea709 (patch)
treec460cae6ef7bc4d391246c08cddee80087f2cf36 /generic/tclCompCmds.c
parent86d928056639a8d39313f7c4ddf273e3522ff70c (diff)
downloadtcl-75fffb6cb1f7ecccb2e0ab2a471bfb0628aea709.zip
tcl-75fffb6cb1f7ecccb2e0ab2a471bfb0628aea709.tar.gz
tcl-75fffb6cb1f7ecccb2e0ab2a471bfb0628aea709.tar.bz2
size_t continued
Diffstat (limited to 'generic/tclCompCmds.c')
-rw-r--r--generic/tclCompCmds.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 6522640..7d1fbb9 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -1793,7 +1793,7 @@ TclCompileDictUpdateCmd(
* that are to be used.
*/
- duiPtr = (DictUpdateInfo *)Tcl_Alloc(offsetof(DictUpdateInfo, varIndices) + sizeof(int) * numVars);
+ duiPtr = (DictUpdateInfo *)Tcl_Alloc(offsetof(DictUpdateInfo, varIndices) + sizeof(size_t) * numVars);
duiPtr->length = numVars;
keyTokenPtrs = (Tcl_Token **)TclStackAlloc(interp, sizeof(Tcl_Token *) * numVars);
tokenPtr = TokenAfter(dictVarTokenPtr);
@@ -1812,7 +1812,7 @@ TclCompileDictUpdateCmd(
*/
duiPtr->varIndices[i] = LocalScalarFromToken(tokenPtr, envPtr);
- if (duiPtr->varIndices[i] < 0) {
+ if (duiPtr->varIndices[i] == TCL_INDEX_NONE) {
goto failedUpdateInfoAssembly;
}
tokenPtr = TokenAfter(tokenPtr);
@@ -2275,7 +2275,7 @@ DupDictUpdateInfo(
size_t len;
dui1Ptr = (DictUpdateInfo *)clientData;
- len = offsetof(DictUpdateInfo, varIndices) + sizeof(int) * dui1Ptr->length;
+ len = offsetof(DictUpdateInfo, varIndices) + sizeof(size_t) * dui1Ptr->length;
dui2Ptr = (DictUpdateInfo *)Tcl_Alloc(len);
memcpy(dui2Ptr, dui1Ptr, len);
return dui2Ptr;
@@ -2302,7 +2302,7 @@ PrintDictUpdateInfo(
if (i) {
Tcl_AppendToObj(appendObj, ", ", -1);
}
- Tcl_AppendPrintfToObj(appendObj, "%%v%u", duiPtr->varIndices[i]);
+ Tcl_AppendPrintfToObj(appendObj, "%%v%" TCL_Z_MODIFIER "u", duiPtr->varIndices[i]);
}
}