[pywin32-checkins] pywin32/com/win32comext/axdebug/src AXDebug.cpp, 1.9, 1.10
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
|
From: Mark H. <mha...@us...> - 2010-11-13 06:27:48
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axdebug/src In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv11595/win32comext/axdebug/src Modified Files: AXDebug.cpp Log Message: make axdebug 64bit friendly Index: AXDebug.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axdebug/src/AXDebug.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** AXDebug.cpp 2 Mar 2009 06:10:40 -0000 1.9 --- AXDebug.cpp 13 Nov 2010 06:27:40 -0000 1.10 *************** *** 156,177 **** { int i; ! return PyInt_FromLong((long)&i); } static PyObject *GetThreadStateHandle(PyObject *self, PyObject *args) { - assert(sizeof(void *) <= sizeof(long)); // can we hack ptrs into longs? // We _must_ have the thread-lock to be called! PyThreadState *myState = PyThreadState_Swap(NULL); PyThreadState_Swap(myState); ! return PyInt_FromLong( (long)myState); } static PyObject *SetThreadStateTrace(PyObject *self, PyObject *args) { ! long handle; PyObject *func; ! if (!PyArg_ParseTuple(args, "lO", &handle, &func)) return NULL; - PyThreadState *state = (PyThreadState *)handle; #if (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION >= 2) || PY_MAJOR_VERSION > 2 #pragma message("XXXXXXXXX - upgrade this for new tracing features.") --- 156,178 ---- { int i; ! return PyWinLong_FromVoidPtr(&i); } static PyObject *GetThreadStateHandle(PyObject *self, PyObject *args) { // We _must_ have the thread-lock to be called! PyThreadState *myState = PyThreadState_Swap(NULL); PyThreadState_Swap(myState); ! return PyWinLong_FromVoidPtr(myState); } static PyObject *SetThreadStateTrace(PyObject *self, PyObject *args) { ! PyObject *obhandle; PyObject *func; ! if (!PyArg_ParseTuple(args, "OO", &obhandle, &func)) ! return NULL; ! PyThreadState *state; ! if (!PyWinLong_AsVoidPtr(obhandle, (void **)&state)) return NULL; #if (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION >= 2) || PY_MAJOR_VERSION > 2 #pragma message("XXXXXXXXX - upgrade this for new tracing features.") |