From b273a9c1d4c036fce56101f8723037d491d6618f Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 20 Mar 2023 11:40:25 +0000 Subject: Use TclNewIndexObj() in stead of Tcl_NewWideIntObj(), which - actually - does the same but better for debugging. --- generic/tclCmdAH.c | 16 +++++++++------- 1 file 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 */ -- cgit v0.12