[Python-checkins] r55602 - in python/trunk: PC/WinMain.c PC/_winreg.c PC/dl_nt.c PC/winsound.c Python/dynload_win.c
kristjan.jonsson
python-checkins at python.org
Sat May 26 21:31:47 CEST 2007
Author: kristjan.jonsson
Date: Sat May 26 21:31:39 2007
New Revision: 55602
Modified:
python/trunk/PC/WinMain.c
python/trunk/PC/_winreg.c
python/trunk/PC/dl_nt.c
python/trunk/PC/winsound.c
python/trunk/Python/dynload_win.c
Log:
Include <windows.h> after python.h, so that WINNT is properly set before windows.h is included. Fixes warnings in PC builds.
Modified: python/trunk/PC/WinMain.c
==============================================================================
--- python/trunk/PC/WinMain.c (original)
+++ python/trunk/PC/WinMain.c Sat May 26 21:31:39 2007
@@ -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 */
Modified: python/trunk/PC/_winreg.c
==============================================================================
--- python/trunk/PC/_winreg.c (original)
+++ python/trunk/PC/_winreg.c Sat May 26 21:31:39 2007
@@ -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);
Modified: python/trunk/PC/dl_nt.c
==============================================================================
--- python/trunk/PC/dl_nt.c (original)
+++ python/trunk/PC/dl_nt.c Sat May 26 21:31:39 2007
@@ -7,11 +7,9 @@
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
Modified: python/trunk/PC/winsound.c
==============================================================================
--- python/trunk/PC/winsound.c (original)
+++ python/trunk/PC/winsound.c Sat May 26 21:31:39 2007
@@ -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
Modified: python/trunk/Python/dynload_win.c
==============================================================================
--- python/trunk/Python/dynload_win.c (original)
+++ python/trunk/Python/dynload_win.c Sat May 26 21:31:39 2007
@@ -1,7 +1,6 @@
/* Support for dynamic loading of extension modules */
-#include <windows.h>
#ifdef HAVE_DIRECT_H
#include <direct.h>
#endif
@@ -9,6 +8,7 @@
#include "Python.h"
#include "importdl.h"
+#include <windows.h>
const struct filedescr _PyImport_DynLoadFiletab[] = {
#ifdef _DEBUG
More information about the Python-checkins
mailing list