[pywin32-checkins] pywin32/Pythonwin win32notify.cpp, 1.2, 1.3 win32cmd.cpp, 1.3, 1.4
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2007-06-08 07:20:10
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19055/Pythonwin Modified Files: win32notify.cpp win32cmd.cpp Log Message: replace ssize_t with SSIZE_T so things still build with vc6 Index: win32notify.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32notify.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** win32notify.cpp 3 Jun 2007 12:35:58 -0000 1.2 --- win32notify.cpp 8 Jun 2007 07:20:09 -0000 1.3 *************** *** 171,176 **** if (!PyString_Check(ob)) MY_RET_ERR("Expected string object") char *val = PyString_AsString(ob); ! ssize_t slen = strlen(val); ! ssize_t copylen = max(bufSize-1, slen); strncpy( pUse, val, copylen); pUse[copylen] = '\0'; --- 171,176 ---- if (!PyString_Check(ob)) MY_RET_ERR("Expected string object") char *val = PyString_AsString(ob); ! SSIZE_T slen = strlen(val); ! SSIZE_T copylen = max(bufSize-1, slen); strncpy( pUse, val, copylen); pUse[copylen] = '\0'; *************** *** 190,194 **** if (!PyString_Check(ob)) MY_RET_ERR("Expected string object") char *szVal = PyString_AsString(ob); ! ssize_t slen = strlen(szVal); mbstowcs( (wchar_t *)pUse, szVal, bufSize ); } --- 190,194 ---- if (!PyString_Check(ob)) MY_RET_ERR("Expected string object") char *szVal = PyString_AsString(ob); ! SSIZE_T slen = strlen(szVal); mbstowcs( (wchar_t *)pUse, szVal, bufSize ); } Index: win32cmd.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32cmd.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** win32cmd.cpp 3 Jun 2007 12:35:57 -0000 1.3 --- win32cmd.cpp 8 Jun 2007 07:20:09 -0000 1.4 *************** *** 189,196 **** CString csRet; char *buf = csRet.GetBuffer(64); ! ssize_t numCmd = pCommandHookList ? pCommandHookList->GetCount() : 0; ! ssize_t numNotify = pNotifyHookList ? pNotifyHookList->GetCount() : 0; ! ssize_t numCmdUpdate = pCommandUpdateHookList ? pCommandUpdateHookList->GetCount() : 0; ! ssize_t numOle = pOleEventHookList ? pOleEventHookList->GetCount() : 0; sprintf(buf, ", notify=%I,ch/u=%I/%I", numNotify, numCmd, numCmdUpdate); csRet.ReleaseBuffer(); --- 189,196 ---- CString csRet; char *buf = csRet.GetBuffer(64); ! SSIZE_T numCmd = pCommandHookList ? pCommandHookList->GetCount() : 0; ! SSIZE_T numNotify = pNotifyHookList ? pNotifyHookList->GetCount() : 0; ! SSIZE_T numCmdUpdate = pCommandUpdateHookList ? pCommandUpdateHookList->GetCount() : 0; ! SSIZE_T numOle = pOleEventHookList ? pOleEventHookList->GetCount() : 0; sprintf(buf, ", notify=%I,ch/u=%I/%I", numNotify, numCmd, numCmdUpdate); csRet.ReleaseBuffer(); |