summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-05-01 21:10:02 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-05-01 21:10:02 (GMT)
commit0045adce01c53ec2e867265e7ece58744f67f68a (patch)
tree9411c4eca2874e76b0312b5a872bdda33073ded8 /generic
parent657fe549c6c15721a179d3bcd6e504f70b56a47e (diff)
parentd52dd6d1f39463186ea3f591128b7335f73e9615 (diff)
downloadtk-0045adce01c53ec2e867265e7ece58744f67f68a.zip
tk-0045adce01c53ec2e867265e7ece58744f67f68a.tar.gz
tk-0045adce01c53ec2e867265e7ece58744f67f68a.tar.bz2
Use Tcl_NewBooleanObj() where appropriate
Diffstat (limited to 'generic')
-rw-r--r--generic/tk3d.c4
-rw-r--r--generic/tkCursor.c4
-rw-r--r--generic/tkEntry.c2
-rw-r--r--generic/tkWindow.c2
-rw-r--r--generic/ttk/ttkEntry.c2
-rw-r--r--generic/ttk/ttkTreeview.c4
-rw-r--r--generic/ttk/ttkWidget.c2
7 files changed, 10 insertions, 10 deletions
diff --git a/generic/tk3d.c b/generic/tk3d.c
index 0920dc1..33e2e56 100644
--- a/generic/tk3d.c
+++ b/generic/tk3d.c
@@ -1389,9 +1389,9 @@ TkDebugBorder(
Tcl_Obj *objPtr = Tcl_NewObj();
Tcl_ListObjAppendElement(NULL, objPtr,
- Tcl_NewWideIntObj((Tcl_WideInt)borderPtr->resourceRefCount));
+ Tcl_NewWideIntObj(borderPtr->resourceRefCount));
Tcl_ListObjAppendElement(NULL, objPtr,
- Tcl_NewWideIntObj((Tcl_WideInt)borderPtr->objRefCount));
+ Tcl_NewWideIntObj(borderPtr->objRefCount));
Tcl_ListObjAppendElement(NULL, resultPtr, objPtr);
}
}
diff --git a/generic/tkCursor.c b/generic/tkCursor.c
index ea0a35f..9785470 100644
--- a/generic/tkCursor.c
+++ b/generic/tkCursor.c
@@ -868,9 +868,9 @@ TkDebugCursor(
for ( ; (cursorPtr != NULL); cursorPtr = cursorPtr->nextPtr) {
objPtr = Tcl_NewObj();
Tcl_ListObjAppendElement(NULL, objPtr,
- Tcl_NewWideIntObj((Tcl_WideInt)cursorPtr->resourceRefCount));
+ Tcl_NewWideIntObj(cursorPtr->resourceRefCount));
Tcl_ListObjAppendElement(NULL, objPtr,
- Tcl_NewWideIntObj((Tcl_WideInt)cursorPtr->objRefCount));
+ Tcl_NewWideIntObj(cursorPtr->objRefCount));
Tcl_ListObjAppendElement(NULL, resultPtr, objPtr);
}
}
diff --git a/generic/tkEntry.c b/generic/tkEntry.c
index a07a533..d1514d1 100644
--- a/generic/tkEntry.c
+++ b/generic/tkEntry.c
@@ -880,7 +880,7 @@ EntryWidgetObjCmd(
goto error;
}
Tcl_SetObjResult(interp,
- Tcl_NewWideIntObj(entryPtr->selectFirst != TCL_INDEX_NONE));
+ Tcl_NewBooleanObj(entryPtr->selectFirst != TCL_INDEX_NONE));
goto done;
case SELECTION_RANGE:
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index 6b1e154..20eca1b 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -3293,7 +3293,7 @@ Initialize(
Tcl_SetVar2Ex(interp, "argv", NULL,
Tcl_NewListObj(objc-1, rest+1), TCL_GLOBAL_ONLY);
Tcl_SetVar2Ex(interp, "argc", NULL,
- Tcl_NewWideIntObj((Tcl_WideInt)objc-1), TCL_GLOBAL_ONLY);
+ Tcl_NewWideIntObj(objc-1), TCL_GLOBAL_ONLY);
ckfree(rest);
}
Tcl_DecrRefCount(parseList);
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c
index fee2bc2..d59eef8 100644
--- a/generic/ttk/ttkEntry.c
+++ b/generic/ttk/ttkEntry.c
@@ -1645,7 +1645,7 @@ static int EntrySelectionPresentCommand(
return TCL_ERROR;
}
Tcl_SetObjResult(interp,
- Tcl_NewWideIntObj(entryPtr->entry.selectFirst >= 0));
+ Tcl_NewBooleanObj(entryPtr->entry.selectFirst >= 0));
return TCL_OK;
}
diff --git a/generic/ttk/ttkTreeview.c b/generic/ttk/ttkTreeview.c
index 3af1094..5880a49 100644
--- a/generic/ttk/ttkTreeview.c
+++ b/generic/ttk/ttkTreeview.c
@@ -2716,7 +2716,7 @@ static int TreeviewExistsCommand(
}
entryPtr = Tcl_FindHashEntry(&tv->tree.items, Tcl_GetString(objv[2]));
- Tcl_SetObjResult(interp, Tcl_NewWideIntObj(entryPtr != 0));
+ Tcl_SetObjResult(interp, Tcl_NewBooleanObj(entryPtr != 0));
return TCL_OK;
}
@@ -4080,7 +4080,7 @@ static int TreeviewTagHasCommand(
return TCL_ERROR;
}
Tcl_SetObjResult(interp,
- Tcl_NewWideIntObj(Ttk_TagSetContains(item->tagset, tag)));
+ Tcl_NewBooleanObj(Ttk_TagSetContains(item->tagset, tag)));
return TCL_OK;
} else {
Tcl_WrongNumArgs(interp, 3, objv, "tagName ?item?");
diff --git a/generic/ttk/ttkWidget.c b/generic/ttk/ttkWidget.c
index 5790cc3..b5d9a21 100644
--- a/generic/ttk/ttkWidget.c
+++ b/generic/ttk/ttkWidget.c
@@ -734,7 +734,7 @@ int TtkWidgetInstateCommand(
if (objc == 3) {
Tcl_SetObjResult(interp,
- Tcl_NewWideIntObj(Ttk_StateMatches(state,&spec)));
+ Tcl_NewBooleanObj(Ttk_StateMatches(state,&spec)));
} else if (objc == 4) {
if (Ttk_StateMatches(state,&spec)) {
status = Tcl_EvalObjEx(interp, objv[3], 0);