[pywin32-checkins] pywin32/win32/src PyLARGE_INTEGER.cpp, 1.15, 1.16
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2010-11-12 03:35:24
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv4684/win32/src Modified Files: PyLARGE_INTEGER.cpp Log Message: Fix py3k problem with PyWinObject_AsLARGE_INTEGER and ints > 32bits Index: PyLARGE_INTEGER.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyLARGE_INTEGER.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** PyLARGE_INTEGER.cpp 13 Jan 2009 22:54:09 -0000 1.15 --- PyLARGE_INTEGER.cpp 12 Nov 2010 03:35:16 -0000 1.16 *************** *** 22,25 **** --- 22,26 ---- BOOL PyWinObject_AsLARGE_INTEGER(PyObject *ob, LARGE_INTEGER *pResult) { + #if (PY_VERSION_HEX < 0x03000000) if (PyInt_Check(ob)) { // 32 bit integer value. *************** *** 29,33 **** LISet32(*pResult, x); return TRUE; ! } else if (PyLong_Check(ob)) { pResult->QuadPart=PyLong_AsLongLong(ob); return !(pResult->QuadPart == -1 && PyErr_Occurred()); --- 30,36 ---- LISet32(*pResult, x); return TRUE; ! } else ! #endif ! if (PyLong_Check(ob)) { pResult->QuadPart=PyLong_AsLongLong(ob); return !(pResult->QuadPart == -1 && PyErr_Occurred()); |