Include <windows.h> after python.h, so that WINNT is properly set bef… · khallZD/python@feacfa6 · GitHub
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

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

0 commit comments

Comments
 (0)