Update of /cvsroot/pywin32/pywin32/win32/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1254
Modified Files:
Tag: py3k
PyWinTypes.h win2krasmodule.cpp win32clipboardmodule.cpp
win32crypt.i win32event.i win32file.i win32file_comm.cpp
win32helpmodule.cpp win32job.i win32trace.cpp
Log Message:
merge rationalization of headers from trunk
Index: win32trace.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32trace.cpp,v
retrieving revision 1.14.2.3
retrieving revision 1.14.2.4
diff -C2 -d -r1.14.2.3 -r1.14.2.4
*** win32trace.cpp 8 Dec 2008 13:41:06 -0000 1.14.2.3
--- win32trace.cpp 3 Jan 2009 23:46:35 -0000 1.14.2.4
***************
*** 31,37 ****
*/
- #include "windows.h"
- #include "Python.h"
- #include "structmember.h"
#include "PyWinTypes.h"
#include "PyWinObjects.h"
--- 31,34 ----
Index: win32file_comm.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32file_comm.cpp,v
retrieving revision 1.5.4.2
retrieving revision 1.5.4.3
diff -C2 -d -r1.5.4.2 -r1.5.4.3
*** win32file_comm.cpp 27 Sep 2008 18:07:41 -0000 1.5.4.2
--- win32file_comm.cpp 3 Jan 2009 23:46:35 -0000 1.5.4.3
***************
*** 4,10 ****
// @doc
- #include "windows.h"
- #include "Python.h"
- #include "structmember.h"
#include "PyWinTypes.h"
#include "PyWinObjects.h"
--- 4,7 ----
Index: win32clipboardmodule.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32clipboardmodule.cpp,v
retrieving revision 1.23.2.4
retrieving revision 1.23.2.5
diff -C2 -d -r1.23.2.4 -r1.23.2.5
*** win32clipboardmodule.cpp 8 Dec 2008 13:41:06 -0000 1.23.2.4
--- win32clipboardmodule.cpp 3 Jan 2009 23:46:35 -0000 1.23.2.5
***************
*** 18,25 ****
#define PY_SSIZE_T_CLEAN // this should be Py_ssize_t clean!
- // #define UNICODE
- // #define _UNICODE // CRT function (_tcs*) switch based on this
- #include "windows.h"
- #include "Python.h"
#include "pywintypes.h"
--- 18,21 ----
Index: win32job.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32job.i,v
retrieving revision 1.4.2.1
retrieving revision 1.4.2.2
diff -C2 -d -r1.4.2.1 -r1.4.2.2
*** win32job.i 29 Aug 2008 04:59:27 -0000 1.4.2.1
--- win32job.i 3 Jan 2009 23:46:35 -0000 1.4.2.2
***************
*** 9,13 ****
#endif
- #include "windows.h"
#include "PyWinTypes.h"
--- 9,12 ----
Index: win32event.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32event.i,v
retrieving revision 1.9.2.2
retrieving revision 1.9.2.3
diff -C2 -d -r1.9.2.2 -r1.9.2.3
*** win32event.i 4 Oct 2008 00:30:04 -0000 1.9.2.2
--- win32event.i 3 Jan 2009 23:46:35 -0000 1.9.2.3
***************
*** 7,15 ****
//#define UNICODE
#define _WIN32_WINNT 0x0501
- #ifndef MS_WINCE
- #include "windows.h"
- //#include "winsock2.h"
- //#include "mswsock.h"
- #endif
%}
--- 7,10 ----
Index: win32crypt.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32crypt.i,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -C2 -d -r1.5 -r1.5.2.1
*** win32crypt.i 3 Jun 2007 14:53:07 -0000 1.5
--- win32crypt.i 3 Jan 2009 23:46:35 -0000 1.5.2.1
***************
*** 4,10 ****
%{
- #include "windows.h"
- #include "wincrypt.h"
#include "PyWinTypes.h"
#include "malloc.h"
#include "abstract.h" // for PyObject_AsReadBuffer
--- 4,9 ----
%{
#include "PyWinTypes.h"
+ #include "wincrypt.h"
#include "malloc.h"
#include "abstract.h" // for PyObject_AsReadBuffer
Index: win32helpmodule.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32helpmodule.cpp,v
retrieving revision 1.4.2.4
retrieving revision 1.4.2.5
diff -C2 -d -r1.4.2.4 -r1.4.2.5
*** win32helpmodule.cpp 8 Dec 2008 13:41:06 -0000 1.4.2.4
--- win32helpmodule.cpp 3 Jan 2009 23:46:35 -0000 1.4.2.5
***************
*** 16,24 ****
- #include "windows.h"
- #include "htmlhelp.h"
- #include "Python.h"
- #include "structmember.h"
#include "PyWinTypes.h"
#define DllExport _declspec(dllexport)
--- 16,21 ----
#include "PyWinTypes.h"
+ #include "htmlhelp.h"
#define DllExport _declspec(dllexport)
Index: win2krasmodule.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win2krasmodule.cpp,v
retrieving revision 1.6.2.3
retrieving revision 1.6.2.4
diff -C2 -d -r1.6.2.3 -r1.6.2.4
*** win2krasmodule.cpp 8 Dec 2008 13:41:06 -0000 1.6.2.3
--- win2krasmodule.cpp 3 Jan 2009 23:46:35 -0000 1.6.2.4
***************
*** 16,26 ****
#endif
! #include "windows.h"
#include "ras.h"
#include "raserror.h"
- #include "Python.h"
- #include "pywintypes.h"
-
typedef PyObject* (*PFNReturnRasError)(char *fnName, long err);
--- 16,23 ----
#endif
! #include "pywintypes.h"
#include "ras.h"
#include "raserror.h"
typedef PyObject* (*PFNReturnRasError)(char *fnName, long err);
Index: PyWinTypes.h
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/PyWinTypes.h,v
retrieving revision 1.51.2.7
retrieving revision 1.51.2.8
diff -C2 -d -r1.51.2.7 -r1.51.2.8
*** PyWinTypes.h 3 Jan 2009 23:43:25 -0000 1.51.2.7
--- PyWinTypes.h 3 Jan 2009 23:46:35 -0000 1.51.2.8
***************
*** 18,23 ****
--- 18,61 ----
// includes - so it is safe to do here (and provides a handy
// choke point for #include vagaries
+
+ // Some other warnings generated by MSVC6 which we don't care about
+ #if (PY_VERSION_HEX < 0x02060000)
+ #pragma warning( disable:4035 )
+ #endif
+
+
#include "Python.h"
+ // many many files need python's structmember.h, and its possible people
+ // #included windows.h before including us...
+ #ifdef WRITE_RESTRICTED
+ #undef WRITE_RESTRICTED
+ #endif
+ #include "structmember.h"
+ // and python's structmember.h #defines this, conflicting with windows.h
+ #ifdef WRITE_RESTRICTED
+ #undef WRITE_RESTRICTED
+ #endif
#include "windows.h"
+ #undef WRITE_RESTRICTED // stop anyone using the wrong one accidently...
+
+ // Python 2.3 doesn't have Py_CLEAR...
+ #if (PY_VERSION_HEX < 0x02040000)
+ #ifndef Py_CLEAR
+ #define Py_CLEAR(op) \
+ do { \
+ if (op) { \
+ PyObject *_py_tmp = (PyObject *)(op); \
+ (op) = NULL; \
+ Py_DECREF(_py_tmp); \
+ } \
+ } while (0)
+ #endif
+ // or Py_RETURN_NONE
+ #ifndef Py_RETURN_NONE
+ /* Macro for returning Py_None from a function */
+ #define Py_RETURN_NONE return Py_INCREF(Py_None), Py_None
+ #endif
+
+ #endif // (PY_VERSION_HEX < 0x02040000)
Index: win32file.i
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32file.i,v
retrieving revision 1.93.2.5
retrieving revision 1.93.2.6
diff -C2 -d -r1.93.2.5 -r1.93.2.6
*** win32file.i 11 Dec 2008 04:13:35 -0000 1.93.2.5
--- win32file.i 3 Jan 2009 23:46:35 -0000 1.93.2.6
***************
*** 30,34 ****
#include "winsock2.h"
#include "mswsock.h"
! #include "windows.h"
#include "winbase.h"
#include "assert.h"
--- 30,34 ----
#include "winsock2.h"
#include "mswsock.h"
! #include "pywintypes.h"
#include "winbase.h"
#include "assert.h"
|