]> granicus.if.org Git - python/commitdiff
Include tkinter.h only after including tk.h (or the equivalent for another platform).
authorGuilherme Polo <ggpolo@gmail.com>
Sun, 5 Apr 2009 02:11:19 +0000 (02:11 +0000)
committerGuilherme Polo <ggpolo@gmail.com>
Sun, 5 Apr 2009 02:11:19 +0000 (02:11 +0000)
Modules/_tkinter.c
Modules/tkinter.h

index 775598cc5a9c47affaddf654e67b09e3064269d1..ea36297c382c977848c94c592946827bc120a43b 100644 (file)
@@ -33,8 +33,6 @@ Copyright (C) 1994 Steen Lumholt.
 #include <windows.h>
 #endif
 
-#include "tkinter.h"
-
 /* Allow using this code in Python 2.[12] */
 #ifndef PyDoc_STRVAR
 #define PyDoc_STRVAR(name,str) static char name[] = str
@@ -69,6 +67,8 @@ Copyright (C) 1994 Steen Lumholt.
 #include <tk.h>
 #endif
 
+#include "tkinter.h"
+
 /* For Tcl 8.2 and 8.3, CONST* is not defined (except on Cygwin). */
 #ifndef CONST84_RETURN
 #define CONST84_RETURN
index 57be878531ab236407c1008e0bd12976cccd1585..f7e50cde0c7e81f67da19d88277900c8627e00e1 100644 (file)
@@ -2,7 +2,9 @@
 #define TKINTER_H
 
 /* This header is used to share some macros between _tkinter.c and
- * tkappinit.c */
+ * tkappinit.c.
+ * Be sure to include tk.h before including this header so
+ * TK_VERSION_HEX is properly defined. */
 
 /* TK_RELEASE_LEVEL is always one of the following:
  *     TCL_ALPHA_RELEASE   0