Update of /cvsroot/pywin32/pywin32/win32/src
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv19184/win32/src
Modified Files:
win32dynamicdialog.cpp
Log Message:
PyLong_AsUnsignedLong doesn't link ints in 2.3 - fixes bug 2962078
Index: win32dynamicdialog.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32dynamicdialog.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** win32dynamicdialog.cpp 28 Dec 2008 10:44:59 -0000 1.6
--- win32dynamicdialog.cpp 23 Oct 2010 04:27:27 -0000 1.7
***************
*** 539,543 ****
--- 539,548 ----
goto cleanup;
if (obexstyle != Py_None) {
+ #if (PY_VERSION_HEX < 0x02040000)
+ // py2.3 dies if PyLong_AsUnsignedLong is passed an int object.
+ tpl.dwExtendedStyle = (unsigned long)PyInt_AsLong(obexstyle);
+ #else
tpl.dwExtendedStyle = PyLong_AsUnsignedLong(obexstyle);
+ #endif
if (tpl.dwExtendedStyle==-1 && PyErr_Occurred())
goto cleanup;
|