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