summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorKristján Valur Jónsson <kristjan@ccpgames.com>2007-05-26 19:31:39 (GMT)
committerKristján Valur Jónsson <kristjan@ccpgames.com>2007-05-26 19:31:39 (GMT)
commit629ec26f637844f912d8f5aa6e21bae5d59f559f (patch)
tree8debb7c1a201e6018c948acd7fd177a992c24634 /PC
parentba526438f8ce4bde87f7b38f966688a5193a7c5e (diff)
downloadcpython-629ec26f637844f912d8f5aa6e21bae5d59f559f.zip
cpython-629ec26f637844f912d8f5aa6e21bae5d59f559f.tar.gz
cpython-629ec26f637844f912d8f5aa6e21bae5d59f559f.tar.bz2
Include <windows.h> after python.h, so that WINNT is properly set before windows.h is included. Fixes warnings in PC builds.
Diffstat (limited to 'PC')
-rw-r--r--PC/WinMain.c4
-rw-r--r--PC/_winreg.c2
-rw-r--r--PC/dl_nt.c4
-rw-r--r--PC/winsound.c2
4 files changed, 5 insertions, 7 deletions
diff --git a/PC/WinMain.c b/PC/WinMain.c
index 00dc18d..2cdd0cb 100644
--- a/PC/WinMain.c
+++ b/PC/WinMain.c
@@ -1,10 +1,10 @@
/* Minimal main program -- everything is loaded from the library. */
+#include "Python.h"
+
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
-#include "Python.h"
-
int WINAPI WinMain(
HINSTANCE hInstance, /* handle to current instance */
HINSTANCE hPrevInstance, /* handle to previous instance */
diff --git a/PC/_winreg.c b/PC/_winreg.c
index 782761b..920e1d1 100644
--- a/PC/_winreg.c
+++ b/PC/_winreg.c
@@ -12,10 +12,10 @@
*/
-#include "windows.h"
#include "Python.h"
#include "structmember.h"
#include "malloc.h" /* for alloca */
+#include "windows.h"
static BOOL PyHKEY_AsHKEY(PyObject *ob, HKEY *pRes, BOOL bNoneOK);
static PyObject *PyHKEY_FromHKEY(HKEY h);
diff --git a/PC/dl_nt.c b/PC/dl_nt.c
index 2608f7e..a87b523 100644
--- a/PC/dl_nt.c
+++ b/PC/dl_nt.c
@@ -7,11 +7,9 @@ be called, removing that burden (and possible source of frustration if
forgotten) from the programmer.
*/
-#include "windows.h"
-/* NT and Python share these */
-#include "pyconfig.h"
#include "Python.h"
+#include "windows.h"
char dllVersionBuffer[16] = ""; // a private buffer
diff --git a/PC/winsound.c b/PC/winsound.c
index 4e94230..9ff3b7e 100644
--- a/PC/winsound.c
+++ b/PC/winsound.c
@@ -35,9 +35,9 @@
winsound.PlaySound(None, 0)
*/
+#include <Python.h>
#include <windows.h>
#include <mmsystem.h>
-#include <Python.h>
#ifdef HAVE_CONIO_H
#include <conio.h> /* port functions on Win9x */
#endif