Include <windows.h> after python.h, so that WINNT is properly set before...

Include <windows.h> after python.h, so that WINNT is properly set before windows.h is included.  Fixes warnings in PC builds.
parent ba526438
/* Minimal main program -- everything is loaded from the library. */ /* Minimal main program -- everything is loaded from the library. */
#include "Python.h"
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
#include "Python.h"
int WINAPI WinMain( int WINAPI WinMain(
HINSTANCE hInstance, /* handle to current instance */ HINSTANCE hInstance, /* handle to current instance */
HINSTANCE hPrevInstance, /* handle to previous instance */ HINSTANCE hPrevInstance, /* handle to previous instance */
......
...@@ -12,10 +12,10 @@ ...@@ -12,10 +12,10 @@
*/ */
#include "windows.h"
#include "Python.h" #include "Python.h"
#include "structmember.h" #include "structmember.h"
#include "malloc.h" /* for alloca */ #include "malloc.h" /* for alloca */
#include "windows.h"
static BOOL PyHKEY_AsHKEY(PyObject *ob, HKEY *pRes, BOOL bNoneOK); static BOOL PyHKEY_AsHKEY(PyObject *ob, HKEY *pRes, BOOL bNoneOK);
static PyObject *PyHKEY_FromHKEY(HKEY h); static PyObject *PyHKEY_FromHKEY(HKEY h);
......
...@@ -7,11 +7,9 @@ be called, removing that burden (and possible source of frustration if ...@@ -7,11 +7,9 @@ be called, removing that burden (and possible source of frustration if
forgotten) from the programmer. forgotten) from the programmer.
*/ */
#include "windows.h"
/* NT and Python share these */
#include "pyconfig.h"
#include "Python.h" #include "Python.h"
#include "windows.h"
char dllVersionBuffer[16] = ""; // a private buffer char dllVersionBuffer[16] = ""; // a private buffer
......
...@@ -35,9 +35,9 @@ ...@@ -35,9 +35,9 @@
winsound.PlaySound(None, 0) winsound.PlaySound(None, 0)
*/ */
#include <Python.h>
#include <windows.h> #include <windows.h>
#include <mmsystem.h> #include <mmsystem.h>
#include <Python.h>
#ifdef HAVE_CONIO_H #ifdef HAVE_CONIO_H
#include <conio.h> /* port functions on Win9x */ #include <conio.h> /* port functions on Win9x */
#endif #endif
......
/* Support for dynamic loading of extension modules */ /* Support for dynamic loading of extension modules */
#include <windows.h>
#ifdef HAVE_DIRECT_H #ifdef HAVE_DIRECT_H
#include <direct.h> #include <direct.h>
#endif #endif
...@@ -9,6 +8,7 @@ ...@@ -9,6 +8,7 @@
#include "Python.h" #include "Python.h"
#include "importdl.h" #include "importdl.h"
#include <windows.h>
const struct filedescr _PyImport_DynLoadFiletab[] = { const struct filedescr _PyImport_DynLoadFiletab[] = {
#ifdef _DEBUG #ifdef _DEBUG
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment