more old __THREADS__ fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7977 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
587e14033f
commit
9ff58e4997
2 changed files with 3 additions and 5 deletions
|
|
@ -22,9 +22,6 @@ namespace Swig {
|
|||
|
||||
/* wrap a python object, optionally taking ownership */
|
||||
Director::Director(PyObject* self) : swig_self(self), swig_disown_flag(false) {
|
||||
#ifdef __PTHREAD__
|
||||
MUTEX_INIT(swig_mutex_own);
|
||||
#endif
|
||||
swig_incref();
|
||||
}
|
||||
|
||||
|
|
@ -34,6 +31,7 @@ namespace Swig {
|
|||
|
||||
#ifdef __PTHREAD__
|
||||
pthread_mutex_t SWIG_MUTEX_INIT(Director::swig_mutex_up);
|
||||
pthread_mutex_t SWIG_MUTEX_INIT(Director::swig_mutex_own);
|
||||
pthread_t Director::swig_mutex_thread;
|
||||
bool Director::swig_mutex_active = false;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ namespace Swig {
|
|||
#if defined(SWIG_PYTHON_THREADS)
|
||||
/* __THREAD__ is the old macro to activate some thread support */
|
||||
# if !defined(__THREAD__)
|
||||
# define __THREAD__
|
||||
# define __THREAD__ 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
|
@ -463,7 +463,7 @@ namespace Swig {
|
|||
private:
|
||||
typedef std::map<void*, GCItem_var> ownership_map;
|
||||
mutable ownership_map owner;
|
||||
mutable pthread_mutex_t swig_mutex_own;
|
||||
static pthread_mutex_t swig_mutex_own;
|
||||
|
||||
public:
|
||||
template <typename Type>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue