fixes for directors + pointers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7860 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
af0aab45d7
commit
f3c24eff33
16 changed files with 808 additions and 137 deletions
|
|
@ -10,15 +10,30 @@
|
|||
#ifdef __cplusplus
|
||||
|
||||
namespace Swig {
|
||||
|
||||
GCItem::~GCItem()
|
||||
{
|
||||
}
|
||||
|
||||
/* simple thread abstraction for pthreads on win32 */
|
||||
Director::~Director() {
|
||||
swig_decref();
|
||||
}
|
||||
|
||||
/* 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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
bool Director::swig_up = false;
|
||||
|
||||
#ifdef __PTHREAD__
|
||||
MUTEX_INIT(Director::swig_mutex_up);
|
||||
pthread_mutex_t SWIG_MUTEX_INIT(Director::swig_mutex_up);
|
||||
pthread_t Director::swig_mutex_thread;
|
||||
bool Director::swig_mutex_active = false;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue