[pywin32-checkins] pywin32/win32/src win32trace.cpp, 1.14.2.1, 1.14.2.2
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-10-30 02:41:46
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13332 Modified Files: Tag: py3k win32trace.cpp Log Message: merge from trunk: 32 and 64bit versions can interoperate. Index: win32trace.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32trace.cpp,v retrieving revision 1.14.2.1 retrieving revision 1.14.2.2 diff -C2 -d -r1.14.2.1 -r1.14.2.2 *** win32trace.cpp 29 Aug 2008 04:59:28 -0000 1.14.2.1 --- win32trace.cpp 30 Oct 2008 02:41:41 -0000 1.14.2.2 *************** *** 40,44 **** ! const size_t BUFFER_SIZE = 0x20000; // Includes size integer. const TCHAR *MAP_OBJECT_NAME = _T("Global\\PythonTraceOutputMapping"); const TCHAR *MUTEX_OBJECT_NAME = _T("Global\\PythonTraceOutputMutex"); --- 40,44 ---- ! const unsigned long BUFFER_SIZE = 0x20000; // Includes size integer. const TCHAR *MAP_OBJECT_NAME = _T("Global\\PythonTraceOutputMapping"); const TCHAR *MUTEX_OBJECT_NAME = _T("Global\\PythonTraceOutputMutex"); *************** *** 336,341 **** BOOL ok = GetMyMutex(); if (ok) { ! size_t *pLen = (size_t *)pMapBaseWrite; ! size_t sizeLeft = (BUFFER_SIZE-sizeof(size_t)) - *pLen; // If less than double we need left, wait for it to empty, or .1 sec. if (sizeLeft < len_this * 2) { --- 336,342 ---- BOOL ok = GetMyMutex(); if (ok) { ! // must use types with identical size on win32 and win64 ! unsigned long *pLen = (unsigned long *)pMapBaseWrite; ! unsigned long sizeLeft = (BUFFER_SIZE-sizeof(unsigned long)) - *pLen; // If less than double we need left, wait for it to empty, or .1 sec. if (sizeLeft < len_this * 2) { *************** *** 347,354 **** } if (ok) { ! size_t *pLen = (size_t *)pMapBaseWrite; ! char *buffer = (char *)(((size_t *)pMapBaseWrite)+1); ! size_t sizeLeft = (BUFFER_SIZE-sizeof(size_t)) - *pLen; if (sizeLeft<len_this) *pLen = 0; --- 348,355 ---- } if (ok) { ! unsigned long *pLen = (unsigned long *)pMapBaseWrite; ! char *buffer = (char *)(((unsigned long *)pMapBaseWrite)+1); ! unsigned long sizeLeft = (BUFFER_SIZE-sizeof(unsigned long)) - *pLen; if (sizeLeft<len_this) *pLen = 0; *************** *** 385,391 **** Py_BEGIN_ALLOW_THREADS if (GetMyMutex()) { ! ! size_t *pLen = (size_t *)pMapBaseRead; ! char *buffer = (char *)(((size_t *)pMapBaseRead)+1); result = (char *)malloc(*pLen + 1); --- 386,392 ---- Py_BEGIN_ALLOW_THREADS if (GetMyMutex()) { ! // must use sizes that are identical on win32 and win64 ! unsigned long*pLen = (unsigned long *)pMapBaseRead; ! char *buffer = (char *)(((unsigned long *)pMapBaseRead)+1); result = (char *)malloc(*pLen + 1); |