Skip to content

Commit feacfa6

Browse files
author
kristjan.jonsson
committed
Include <windows.h> after python.h, so that WINNT is properly set before windows.h is included. Fixes warnings in PC builds.
git-svn-id: http://svn.python.org/projects/python/trunk@55602 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 121cf5a commit feacfa6

5 files changed

Lines changed: 6 additions & 8 deletions

File tree

PC/WinMain.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/* Minimal main program -- everything is loaded from the library. */
22

3+
#include "Python.h"
4+
35
#define WIN32_LEAN_AND_MEAN
46
#include <windows.h>
57

6-
#include "Python.h"
7-
88
int WINAPI WinMain(
99
HINSTANCE hInstance, /* handle to current instance */
1010
HINSTANCE hPrevInstance, /* handle to previous instance */

PC/_winreg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
1313
*/
1414

15-
#include "windows.h"
1615
#include "Python.h"
1716
#include "structmember.h"
1817
#include "malloc.h" /* for alloca */
18+
#include "windows.h"
1919

2020
static BOOL PyHKEY_AsHKEY(PyObject *ob, HKEY *pRes, BOOL bNoneOK);
2121
static PyObject *PyHKEY_FromHKEY(HKEY h);

PC/dl_nt.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ be called, removing that burden (and possible source of frustration if
77
forgotten) from the programmer.
88
99
*/
10-
#include "windows.h"
1110

12-
/* NT and Python share these */
13-
#include "pyconfig.h"
1411
#include "Python.h"
12+
#include "windows.h"
1513

1614
char dllVersionBuffer[16] = ""; // a private buffer
1715

PC/winsound.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
winsound.PlaySound(None, 0)
3636
*/
3737

38+
#include <Python.h>
3839
#include <windows.h>
3940
#include <mmsystem.h>
40-
#include <Python.h>
4141
#ifdef HAVE_CONIO_H
4242
#include <conio.h> /* port functions on Win9x */
4343
#endif

Python/dynload_win.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11

22
/* Support for dynamic loading of extension modules */
33

4-
#include <windows.h>
54
#ifdef HAVE_DIRECT_H
65
#include <direct.h>
76
#endif
87
#include <ctype.h>
98

109
#include "Python.h"
1110
#include "importdl.h"
11+
#include <windows.h>
1212

1313
const struct filedescr _PyImport_DynLoadFiletab[] = {
1414
#ifdef _DEBUG

0 commit comments

Comments
 (0)