summaryrefslogtreecommitdiffstats
path: root/win
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 /win
parent657fe549c6c15721a179d3bcd6e504f70b56a47e (diff)
parentd52dd6d1f39463186ea3f591128b7335f73e9615 (diff)
downloadtk-0045adce01c53ec2e867265e7ece58744f67f68a.zip
tk-0045adce01c53ec2e867265e7ece58744f67f68a.tar.gz
tk-0045adce01c53ec2e867265e7ece58744f67f68a.tar.bz2
Use Tcl_NewBooleanObj() where appropriate
Diffstat (limited to 'win')
-rw-r--r--win/tkWinDialog.c2
-rw-r--r--win/tkWinWm.c20
2 files changed, 11 insertions, 11 deletions
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c
index c414c47..77f8e98 100644
--- a/win/tkWinDialog.c
+++ b/win/tkWinDialog.c
@@ -3203,7 +3203,7 @@ FontchooserCget(
}
break;
case FontchooserVisible:
- resObj = Tcl_NewWideIntObj((hdPtr->hwnd != NULL) && IsWindow(hdPtr->hwnd));
+ resObj = Tcl_NewBooleanObj((hdPtr->hwnd != NULL) && IsWindow(hdPtr->hwnd));
break;
default:
resObj = Tcl_NewStringObj("", 0);
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index eb35e5a..f6d3216 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -2706,8 +2706,8 @@ Tk_WmObjCmd(
return TCL_ERROR;
}
if (objc == 2) {
- Tcl_SetObjResult(interp, Tcl_NewWideIntObj(
- (dispPtr->flags & TK_DISPLAY_WM_TRACING) != 0));
+ Tcl_SetObjResult(interp, Tcl_NewBooleanObj(
+ dispPtr->flags & TK_DISPLAY_WM_TRACING));
return TCL_OK;
}
if (Tcl_GetBooleanFromObj(interp, objv[2], &wmTracing) != TCL_OK) {
@@ -2945,19 +2945,19 @@ WmAttributesCmd(
Tcl_ListObjAppendElement(NULL, objPtr,
Tcl_NewStringObj("-disabled", TCL_INDEX_NONE));
Tcl_ListObjAppendElement(NULL, objPtr,
- Tcl_NewWideIntObj((style & WS_DISABLED) != 0));
+ Tcl_NewBooleanObj(style & WS_DISABLED));
Tcl_ListObjAppendElement(NULL, objPtr,
Tcl_NewStringObj("-fullscreen", TCL_INDEX_NONE));
Tcl_ListObjAppendElement(NULL, objPtr,
- Tcl_NewWideIntObj((wmPtr->flags & WM_FULLSCREEN) != 0));
+ Tcl_NewBooleanObj(wmPtr->flags & WM_FULLSCREEN));
Tcl_ListObjAppendElement(NULL, objPtr,
Tcl_NewStringObj("-toolwindow", TCL_INDEX_NONE));
Tcl_ListObjAppendElement(NULL, objPtr,
- Tcl_NewWideIntObj((exStyle & WS_EX_TOOLWINDOW) != 0));
+ Tcl_NewBooleanObj(exStyle & WS_EX_TOOLWINDOW));
Tcl_ListObjAppendElement(NULL, objPtr,
Tcl_NewStringObj("-topmost", TCL_INDEX_NONE));
Tcl_ListObjAppendElement(NULL, objPtr,
- Tcl_NewWideIntObj((exStyle & WS_EX_TOPMOST) != 0));
+ Tcl_NewBooleanObj(exStyle & WS_EX_TOPMOST));
Tcl_SetObjResult(interp, objPtr);
return TCL_OK;
}
@@ -3105,7 +3105,7 @@ WmAttributesCmd(
config_fullscreen = 0;
} else if (objc == 4) {
Tcl_SetObjResult(interp,
- Tcl_NewWideIntObj((*stylePtr & styleBit) != 0));
+ Tcl_NewBooleanObj(*stylePtr & styleBit));
} else if (boolValue) {
*stylePtr |= styleBit;
} else {
@@ -4752,7 +4752,7 @@ WmOverrideredirectCmd(
curValue = Tk_Attributes((Tk_Window) winPtr)->override_redirect;
}
if (objc == 3) {
- Tcl_SetObjResult(interp, Tcl_NewWideIntObj(curValue != 0));
+ Tcl_SetObjResult(interp, Tcl_NewBooleanObj(curValue));
return TCL_OK;
}
if (Tcl_GetBooleanFromObj(interp, objv[3], &boolValue) != TCL_OK) {
@@ -4978,8 +4978,8 @@ WmResizableCmd(
if (objc == 3) {
Tcl_Obj *results[2];
- results[0] = Tcl_NewWideIntObj(!(wmPtr->flags&WM_WIDTH_NOT_RESIZABLE));
- results[1] = Tcl_NewWideIntObj(!(wmPtr->flags&WM_HEIGHT_NOT_RESIZABLE));
+ results[0] = Tcl_NewBooleanObj(!(wmPtr->flags&WM_WIDTH_NOT_RESIZABLE));
+ results[1] = Tcl_NewBooleanObj(!(wmPtr->flags&WM_HEIGHT_NOT_RESIZABLE));
Tcl_SetObjResult(interp, Tcl_NewListObj(2, results));
return TCL_OK;
}