diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-12-31 15:56:41 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-12-31 15:56:41 (GMT) |
commit | 4224e39596e02ca9cf11a2c160d8f8e7b43a45f9 (patch) | |
tree | e78b5e9ecbd064bd24bc43894cd3dd4e9e075480 /generic/tkCanvas.c | |
parent | ccc7f53ac59980eae109a3314ba3599a8b851fb1 (diff) | |
parent | f2b5a87d6dc6d3468828d48929583d950690a40b (diff) | |
download | tk-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/tkCanvas.c')
-rw-r--r-- | generic/tkCanvas.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index 1671c5f..134ff8d 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -678,9 +678,9 @@ Tk_CanvasObjCmd( canvasPtr->highlightBgColorPtr = NULL; canvasPtr->highlightColorPtr = NULL; canvasPtr->inset = 0; - canvasPtr->pixmapGC = 0; - canvasPtr->width = 0; - canvasPtr->height = 0; + canvasPtr->pixmapGC = NULL; + canvasPtr->width = None; + canvasPtr->height = None; canvasPtr->confine = 0; canvasPtr->textInfo.selBorder = NULL; canvasPtr->textInfo.selBorderWidth = 0; @@ -724,7 +724,7 @@ Tk_CanvasObjCmd( canvasPtr->scanYOrigin = 0; canvasPtr->hotPtr = NULL; canvasPtr->hotPrevPtr = NULL; - canvasPtr->cursor = 0; + canvasPtr->cursor = NULL; canvasPtr->takeFocus = NULL; canvasPtr->pixelsPerMM = WidthOfScreen(Tk_Screen(newWin)); canvasPtr->pixelsPerMM /= WidthMMOfScreen(Tk_Screen(newWin)); @@ -2189,7 +2189,7 @@ DestroyCanvas( */ Tcl_DeleteHashTable(&canvasPtr->idTable); - if (canvasPtr->pixmapGC) { + if (canvasPtr->pixmapGC != None) { Tk_FreeGC(canvasPtr->display, canvasPtr->pixmapGC); } #ifndef USE_OLD_TAG_SEARCH @@ -2265,7 +2265,7 @@ ConfigureCanvas( gcValues.foreground = Tk_3DBorderColor(canvasPtr->bgBorder)->pixel; newGC = Tk_GetGC(canvasPtr->tkwin, GCFunction|GCGraphicsExposures|GCForeground, &gcValues); - if (canvasPtr->pixmapGC) { + if (canvasPtr->pixmapGC != None) { Tk_FreeGC(canvasPtr->display, canvasPtr->pixmapGC); } canvasPtr->pixmapGC = newGC; @@ -4901,7 +4901,7 @@ PickCurrentItem( canvasPtr->pickEvent.xcrossing.display = eventPtr->xmotion.display; canvasPtr->pickEvent.xcrossing.window = eventPtr->xmotion.window; canvasPtr->pickEvent.xcrossing.root = eventPtr->xmotion.root; - canvasPtr->pickEvent.xcrossing.subwindow = 0; + canvasPtr->pickEvent.xcrossing.subwindow = None; canvasPtr->pickEvent.xcrossing.time = eventPtr->xmotion.time; canvasPtr->pickEvent.xcrossing.x = eventPtr->xmotion.x; canvasPtr->pickEvent.xcrossing.y = eventPtr->xmotion.y; |