summaryrefslogtreecommitdiffstats
path: root/generic/tkConfig.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-20 09:44:05 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-12-20 09:44:05 (GMT)
commite26cd8eb2b04a4bd764e382cbcbfe4b1030796c6 (patch)
tree6bca925436edc8dce431cfd10502d50117b62d46 /generic/tkConfig.c
parent0c4227b6cc6e9716ddd086a75e45c4e9373fa51b (diff)
parent81b0bd7641a9d2f63154c97d41c27bbb696ef674 (diff)
downloadtk-e26cd8eb2b04a4bd764e382cbcbfe4b1030796c6.zip
tk-e26cd8eb2b04a4bd764e382cbcbfe4b1030796c6.tar.gz
tk-e26cd8eb2b04a4bd764e382cbcbfe4b1030796c6.tar.bz2
Fix [9e31fd9449]: X11/X.h and Windows.h have conflicting symbols
*** POTENTIAL INCOMPATIBILITY *** for Win32 only: On X11 and Mac, "None" can still be used as before
Diffstat (limited to 'generic/tkConfig.c')
-rw-r--r--generic/tkConfig.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/generic/tkConfig.c b/generic/tkConfig.c
index 795a8e8..4e246c0 100644
--- a/generic/tkConfig.c
+++ b/generic/tkConfig.c
@@ -748,10 +748,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;
}
}
@@ -800,11 +800,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;
}
}
@@ -862,7 +862,7 @@ DoObjConfig(
if (nullOK && ObjectIsEmpty(valuePtr)) {
valuePtr = NULL;
- newWin = None;
+ newWin = 0;
} else {
if (TkGetWindowFromObj(interp, tkwin, valuePtr,
&newWin) != TCL_OK) {
@@ -1646,9 +1646,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);
@@ -1666,9 +1666,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);
@@ -1919,7 +1919,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);
}
@@ -1939,7 +1939,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);
}