[pywin32-checkins] pywin32/win32/src PyHANDLE.cpp, 1.16.2.1, 1.16.2.2
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Roger U. <ru...@us...> - 2008-08-29 07:44:45
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24253 Modified Files: Tag: py3k PyHANDLE.cpp Log Message: Return unicode for PyHANDLE's repr Index: PyHANDLE.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PyHANDLE.cpp,v retrieving revision 1.16.2.1 retrieving revision 1.16.2.2 diff -C2 -d -r1.16.2.1 -r1.16.2.2 *** PyHANDLE.cpp 29 Aug 2008 04:59:25 -0000 1.16.2.1 --- PyHANDLE.cpp 29 Aug 2008 07:44:54 -0000 1.16.2.2 *************** *** 343,349 **** PyObject * PyHANDLE::asStr(void) { ! TCHAR resBuf[160]; ! wsprintf(resBuf, _T("<%s:%Id>"), GetTypeName(), m_handle); ! return PyString_FromTCHAR(resBuf); } --- 343,353 ---- PyObject * PyHANDLE::asStr(void) { ! char resBuf[160]; ! snprintf(resBuf, 160, "<%s:%Id>", GetTypeName(), m_handle); ! #if (PY_VERSION_HEX < 0x03000000) ! return PyString_FromString(resBuf); ! #else ! return PyUnicode_FromString(resBuf); ! #endif } |