[pywin32-checkins] pywin32/win32/src win32pdhmodule.cpp, 1.17.2.4, 1.17.2.5
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Roger U. <ru...@us...> - 2008-09-30 02:03:09
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25277 Modified Files: Tag: py3k win32pdhmodule.cpp Log Message: Support PDH_FMT_LARGE, and some more unicode fixes Index: win32pdhmodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32pdhmodule.cpp,v retrieving revision 1.17.2.4 retrieving revision 1.17.2.5 diff -C2 -d -r1.17.2.4 -r1.17.2.5 *** win32pdhmodule.cpp 29 Sep 2008 01:54:04 -0000 1.17.2.4 --- win32pdhmodule.cpp 30 Sep 2008 02:03:00 -0000 1.17.2.5 *************** *** 710,714 **** else if (format & PDH_FMT_LONG) rc = PyInt_FromLong(result.longValue); ! // XXX - need long int support else { PyErr_SetString(PyExc_ValueError, "Dont know how to convert the result"); --- 710,715 ---- else if (format & PDH_FMT_LONG) rc = PyInt_FromLong(result.longValue); ! else if (format & PDH_FMT_LARGE) ! rc = PyLong_FromLongLong(result.largeValue); else { PyErr_SetString(PyExc_ValueError, "Dont know how to convert the result"); *************** *** 845,855 **** rc = PyWin_SetAPIError("ParseCounterPath", pdhStatus); } else { ! rc = Py_BuildValue("zzzziz", ! pCPE->szMachineName, ! pCPE->szObjectName, ! pCPE->szInstanceName, ! pCPE->szParentInstance, pCPE->dwInstanceIndex, ! pCPE->szCounterName); } free(pBuf); --- 846,856 ---- rc = PyWin_SetAPIError("ParseCounterPath", pdhStatus); } else { ! rc = Py_BuildValue("NNNNkN", ! PyWinObject_FromTCHAR(pCPE->szMachineName), ! PyWinObject_FromTCHAR(pCPE->szObjectName), ! PyWinObject_FromTCHAR(pCPE->szInstanceName), ! PyWinObject_FromTCHAR(pCPE->szParentInstance), pCPE->dwInstanceIndex, ! PyWinObject_FromTCHAR(pCPE->szCounterName)); } free(pBuf); *************** *** 878,882 **** if (pdhStatus != 0) return PyWin_SetAPIError("ParseInstanceName", pdhStatus); ! return Py_BuildValue("ssi", szName, szParent, dwInstance); } --- 879,886 ---- if (pdhStatus != 0) return PyWin_SetAPIError("ParseInstanceName", pdhStatus); ! return Py_BuildValue("NNk", ! PyWinObject_FromTCHAR(szName), ! PyWinObject_FromTCHAR(szParent), ! dwInstance); } |