summaryrefslogtreecommitdiffstats
path: root/generic/tkSquare.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-31 15:56:41 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-31 15:56:41 (GMT)
commit4224e39596e02ca9cf11a2c160d8f8e7b43a45f9 (patch)
treee78b5e9ecbd064bd24bc43894cd3dd4e9e075480 /generic/tkSquare.c
parentccc7f53ac59980eae109a3314ba3599a8b851fb1 (diff)
parentf2b5a87d6dc6d3468828d48929583d950690a40b (diff)
downloadtk-4224e39596e02ca9cf11a2c160d8f8e7b43a45f9.zip
tk-4224e39596e02ca9cf11a2c160d8f8e7b43a45f9.tar.gz
tk-4224e39596e02ca9cf11a2c160d8f8e7b43a45f9.tar.bz2
As requested by Christian Werner/François Vogel and others: Undo many None -> 0 changes, in order to reduce the probability of merge conflicts with other branches.
Remark: Many usages of "None" in Tk are wrong, "NULL" should be used in many places where pointers are referenced in stead of XID's. Those places are corrected.
Diffstat (limited to 'generic/tkSquare.c')
-rw-r--r--generic/tkSquare.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tkSquare.c b/generic/tkSquare.c
index 91247d6..39083d4 100644
--- a/generic/tkSquare.c
+++ b/generic/tkSquare.c
@@ -169,7 +169,7 @@ SquareObjCmd(
squarePtr->widgetCmd = Tcl_CreateObjCommand(interp,
Tk_PathName(squarePtr->tkwin), SquareWidgetObjCmd, squarePtr,
SquareDeletedProc);
- squarePtr->gc = 0;
+ squarePtr->gc = NULL;
squarePtr->optionTable = optionTable;
if (Tk_InitOptions(interp, (char *) squarePtr, optionTable, tkwin)
@@ -335,7 +335,7 @@ SquareConfigure(
Tk_SetWindowBackground(squarePtr->tkwin,
Tk_3DBorderColor(bgBorder)->pixel);
Tcl_GetBooleanFromObj(NULL, squarePtr->doubleBufferPtr, &doubleBuffer);
- if (!squarePtr->gc && doubleBuffer) {
+ if ((squarePtr->gc == None) && (doubleBuffer)) {
XGCValues gcValues;
gcValues.function = GXcopy;
gcValues.graphics_exposures = False;
@@ -397,10 +397,10 @@ SquareObjEventProc(
squarePtr->updatePending = 1;
}
} else if (eventPtr->type == DestroyNotify) {
- if (squarePtr->tkwin) {
+ if (squarePtr->tkwin != NULL) {
Tk_FreeConfigOptions((char *) squarePtr, squarePtr->optionTable,
squarePtr->tkwin);
- if (squarePtr->gc) {
+ if (squarePtr->gc != None) {
Tk_FreeGC(squarePtr->display, squarePtr->gc);
}
squarePtr->tkwin = NULL;
@@ -475,7 +475,7 @@ SquareDisplay(
{
Square *squarePtr = clientData;
Tk_Window tkwin = squarePtr->tkwin;
- Pixmap pm = 0;
+ Pixmap pm = None;
Drawable d;
int borderWidth, size, relief;
Tk_3DBorder bgBorder, fgBorder;