[PD-cvs] externals/grill/py/source main.cpp,1.6,1.7 main.h,1.8,1.9 pyext.cpp,1.9,1.10
xovo at users.sourceforge.net
xovo at users.sourceforge.net
Sat Nov 29 04:38:04 CET 2003
Update of /cvsroot/pure-data/externals/grill/py/source
In directory sc8-pr-cvs1:/tmp/cvs-serv28610/source
Modified Files:
main.cpp main.h pyext.cpp
Log Message:
""
Index: main.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/py/source/main.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** main.cpp 21 Oct 2003 02:38:31 -0000 1.6
--- main.cpp 29 Nov 2003 03:38:01 -0000 1.7
***************
*** 26,30 ****
--- 26,33 ----
PyInterpreterState *py::pystate = NULL;
+
+ #ifdef FLEXT_THREADS
std::map<flext::thrid_t,PyThreadState *> py::pythrmap;
+ #endif
I py::pyref = 0;
***************
*** 102,106 ****
--- 105,112 ----
PyEval_AcquireLock();
+
+ #ifdef FLEXT_THREADS
PyThreadState_Swap(pythrmap[GetThreadId()]);
+ #endif
#ifdef FLEXT_DEBUG
***************
*** 109,114 ****
--- 115,122 ----
#endif
+ #ifdef FLEXT_THREADS
// reset thread state map
pythrmap.clear();
+ #endif
}
else {
Index: main.h
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/py/source/main.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** main.h 21 Oct 2003 02:38:31 -0000 1.8
--- main.h 29 Nov 2003 03:38:01 -0000 1.9
***************
*** 117,123 ****
public:
static PyInterpreterState *pystate;
- static std::map<flext::thrid_t,PyThreadState *> pythrmap;
#ifdef FLEXT_THREADS
ThrMutex mutex;
V Lock() { mutex.Unlock(); }
--- 117,123 ----
public:
static PyInterpreterState *pystate;
#ifdef FLEXT_THREADS
+ static std::map<flext::thrid_t,PyThreadState *> pythrmap;
ThrMutex mutex;
V Lock() { mutex.Unlock(); }
Index: pyext.cpp
===================================================================
RCS file: /cvsroot/pure-data/externals/grill/py/source/pyext.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** pyext.cpp 21 Oct 2003 02:38:31 -0000 1.9
--- pyext.cpp 29 Nov 2003 03:38:01 -0000 1.10
***************
*** 441,446 ****
// store new thread state
pythrmap[GetThreadId()] = newthr;
!
{
// call worker
--- 441,447 ----
// store new thread state
+ #ifdef FLEXT_THREADS
pythrmap[GetThreadId()] = newthr;
! #endif
{
// call worker
***************
*** 450,455 ****
--- 451,458 ----
}
+ #ifdef FLEXT_THREADS
// delete mapped thread state
pythrmap.erase(GetThreadId());
+ #endif
// --- delete Python thread ---
More information about the Pd-cvs
mailing list