diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-12-20 08:02:30 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-12-20 08:02:30 (GMT) |
commit | 81b0bd7641a9d2f63154c97d41c27bbb696ef674 (patch) | |
tree | a17119411589e8c1291df53e2546243d84e78583 /generic/tkConfig.c | |
parent | 93d974c265533cf2445446954346be8192e850a0 (diff) | |
download | tk-81b0bd7641a9d2f63154c97d41c27bbb696ef674.zip tk-81b0bd7641a9d2f63154c97d41c27bbb696ef674.tar.gz tk-81b0bd7641a9d2f63154c97d41c27bbb696ef674.tar.bz2 |
Fix [9e31fd944934e269121fa78ff56b7b86f33e6db6|9e31fd9449]: X11/X.h and Windows.h have conflicting symbols.
Also fix a few newer (harmless) gcc warnings.
Diffstat (limited to 'generic/tkConfig.c')
-rw-r--r-- | generic/tkConfig.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/generic/tkConfig.c b/generic/tkConfig.c index f2eaa33..5fcbab8 100644 --- a/generic/tkConfig.c +++ b/generic/tkConfig.c @@ -802,10 +802,10 @@ DoObjConfig( if (nullOK && ObjectIsEmpty(valuePtr)) { valuePtr = NULL; - newBitmap = None; + newBitmap = 0; } else { newBitmap = Tk_AllocBitmapFromObj(interp, tkwin, valuePtr); - if (newBitmap == None) { + if (!newBitmap) { return TCL_ERROR; } } @@ -854,11 +854,11 @@ DoObjConfig( Tk_Cursor newCursor; if (nullOK && ObjectIsEmpty(valuePtr)) { - newCursor = None; + newCursor = 0; valuePtr = NULL; } else { newCursor = Tk_AllocCursorFromObj(interp, tkwin, valuePtr); - if (newCursor == None) { + if (!newCursor) { return TCL_ERROR; } } @@ -916,7 +916,7 @@ DoObjConfig( if (nullOK && ObjectIsEmpty(valuePtr)) { valuePtr = NULL; - newWin = None; + newWin = 0; } else { if (TkGetWindowFromObj(interp, tkwin, valuePtr, &newWin) != TCL_OK) { @@ -1680,9 +1680,9 @@ FreeResources( break; case TK_OPTION_BITMAP: if (internalFormExists) { - if (*((Pixmap *) internalPtr) != None) { + if (*((Pixmap *) internalPtr)) { Tk_FreeBitmap(Tk_Display(tkwin), *((Pixmap *) internalPtr)); - *((Pixmap *) internalPtr) = None; + *((Pixmap *) internalPtr) = 0; } } else if (objPtr != NULL) { Tk_FreeBitmapFromObj(tkwin, objPtr); @@ -1700,9 +1700,9 @@ FreeResources( break; case TK_OPTION_CURSOR: if (internalFormExists) { - if (*((Tk_Cursor *) internalPtr) != None) { + if (*((Tk_Cursor *) internalPtr)) { Tk_FreeCursor(Tk_Display(tkwin), *((Tk_Cursor *) internalPtr)); - *((Tk_Cursor *) internalPtr) = None; + *((Tk_Cursor *) internalPtr) = 0; } } else if (objPtr != NULL) { Tk_FreeCursorFromObj(tkwin, objPtr); @@ -1954,7 +1954,7 @@ GetObjectForOption( case TK_OPTION_BITMAP: { Pixmap pixmap = *((Pixmap *) internalPtr); - if (pixmap != None) { + if (pixmap) { objPtr = Tcl_NewStringObj( Tk_NameOfBitmap(Tk_Display(tkwin), pixmap), -1); } @@ -1974,7 +1974,7 @@ GetObjectForOption( case TK_OPTION_CURSOR: { Tk_Cursor cursor = *((Tk_Cursor *) internalPtr); - if (cursor != None) { + if (cursor) { objPtr = Tcl_NewStringObj( Tk_NameOfCursor(Tk_Display(tkwin), cursor), -1); } |