summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-20 11:40:25 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-20 11:40:25 (GMT)
commitb273a9c1d4c036fce56101f8723037d491d6618f (patch)
tree444c1ca6c593294e6b6934c2a16be9574995c934 /generic
parent5d63902332fb63571e32e9124190aa3f9c98526b (diff)
downloadtcl-b273a9c1d4c036fce56101f8723037d491d6618f.zip
tcl-b273a9c1d4c036fce56101f8723037d491d6618f.tar.gz
tcl-b273a9c1d4c036fce56101f8723037d491d6618f.tar.bz2
Use TclNewIndexObj() in stead of Tcl_NewWideIntObj(), which - actually - does the same but better for debugging.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCmdAH.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c
index ff0d00f..6c46c8e 100644
--- a/generic/tclCmdAH.c
+++ b/generic/tclCmdAH.c
@@ -720,13 +720,14 @@ EncodingConvertfromObjCmd(
* data as was converted.
*/
if (failVarObj) {
- /* I hope, wide int will cover Tcl_Size data type */
+ Tcl_Obj *failIndex;
+ TclNewIndexObj(failIndex, errorLocation);
if (Tcl_ObjSetVar2(interp,
failVarObj,
NULL,
- Tcl_NewWideIntObj(errorLocation),
+ failIndex,
TCL_LEAVE_ERR_MSG) == NULL) {
- Tcl_DStringFree(&ds);
+ Tcl_DStringFree(&ds);
return TCL_ERROR;
}
}
@@ -816,13 +817,14 @@ EncodingConverttoObjCmd(
* data as was converted.
*/
if (failVarObj) {
- /* I hope, wide int will cover Tcl_Size data type */
+ Tcl_Obj *failIndex;
+ TclNewIndexObj(failIndex, errorLocation);
if (Tcl_ObjSetVar2(interp,
failVarObj,
NULL,
- Tcl_NewWideIntObj(errorLocation),
+ failIndex,
TCL_LEAVE_ERR_MSG) == NULL) {
- Tcl_DStringFree(&ds);
+ Tcl_DStringFree(&ds);
return TCL_ERROR;
}
}
@@ -2952,7 +2954,7 @@ EachloopCmd(
result = TCL_ERROR;
goto done;
}
- /* Don't compute values here, wait until the last momement */
+ /* Don't compute values here, wait until the last moment */
statePtr->argcList[i] = TclArithSeriesObjLength(statePtr->aCopyList[i]);
} else {
/* List values */