[pywin32-checkins] pywin32/win32/src win32trace.cpp,1.14,1.15
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-10-30 02:39:01
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv13188 Modified Files: win32trace.cpp Log Message: Have 32 and 64bit builds use the same sizes so they interoperate. Index: win32trace.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32trace.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** win32trace.cpp 18 May 2007 11:22:17 -0000 1.14 --- win32trace.cpp 30 Oct 2008 02:38:55 -0000 1.15 *************** *** 40,44 **** ! const size_t BUFFER_SIZE = 0x20000; // Includes size integer. const char *MAP_OBJECT_NAME = "Global\\PythonTraceOutputMapping"; const char *MUTEX_OBJECT_NAME = "Global\\PythonTraceOutputMutex"; --- 40,44 ---- ! const unsigned long BUFFER_SIZE = 0x20000; // Includes size integer. const char *MAP_OBJECT_NAME = "Global\\PythonTraceOutputMapping"; const char *MUTEX_OBJECT_NAME = "Global\\PythonTraceOutputMutex"; *************** *** 337,342 **** 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) { --- 337,343 ---- 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) { *************** *** 348,355 **** } 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; --- 349,356 ---- } 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; *************** *** 386,392 **** Py_BEGIN_ALLOW_THREADS if (GetMyMutex()) { ! ! size_t *pLen = (size_t *)pMapBaseRead; ! char *buffer = (char *)(((size_t *)pMapBaseRead)+1); result = (char *)malloc(*pLen + 1); --- 387,393 ---- 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); |