diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2005-02-26 04:57:48 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2005-02-26 04:57:48 +0000 |
commit | 7d9437c8a5fed2d03c22454f643b4bf5598f2d9e (patch) | |
tree | 27301c0c09613cb9fc801a0a19a2f98354f5249a /externals | |
parent | 327c548eb8237c5dd1c6f9eca4fe7787e03506b1 (diff) |
- garbage collection at module scope
- better handling of bang messages
better error reporting
svn path=/trunk/; revision=2583
Diffstat (limited to 'externals')
-rw-r--r-- | externals/grill/py/readme.txt | 3 | ||||
-rw-r--r-- | externals/grill/py/source/main.cpp | 4 | ||||
-rw-r--r-- | externals/grill/py/source/main.h | 2 | ||||
-rw-r--r-- | externals/grill/py/source/pyext.cpp | 4 |
4 files changed, 9 insertions, 4 deletions
diff --git a/externals/grill/py/readme.txt b/externals/grill/py/readme.txt index 1aa18022..ba16e3ff 100644 --- a/externals/grill/py/readme.txt +++ b/externals/grill/py/readme.txt @@ -150,8 +150,9 @@ general: features: - enable multiple interpreters? ( -> not possible within one thread) +- options to fully detach a script (included initialization and finalization) - stop individual threads - support named (keyword) arguments (like attributes for messages) tests: -- check for python threading support +- compile-time check for python threading support diff --git a/externals/grill/py/source/main.cpp b/externals/grill/py/source/main.cpp index bf7345d5..3b75f419 100644 --- a/externals/grill/py/source/main.cpp +++ b/externals/grill/py/source/main.cpp @@ -556,7 +556,7 @@ short py::patcher_myvol(t_patcher *x) } #endif -void py::collect() +bool py::collect() { if(gcollect) { PyObject *args = PyTuple_New(0); @@ -568,8 +568,10 @@ void py::collect() if(refs) post("py/pyext - Garbage collector reports %i unreachable objects",refs); #endif Py_DECREF(ret); + return false; } } + return true; } Fifo::~Fifo() diff --git a/externals/grill/py/source/main.h b/externals/grill/py/source/main.h index 621c9eff..b7000bae 100644 --- a/externals/grill/py/source/main.h +++ b/externals/grill/py/source/main.h @@ -132,7 +132,7 @@ protected: static short patcher_myvol(t_patcher *x); #endif - static void collect(); + static bool collect(); private: diff --git a/externals/grill/py/source/pyext.cpp b/externals/grill/py/source/pyext.cpp index de208aac..5a870d10 100644 --- a/externals/grill/py/source/pyext.cpp +++ b/externals/grill/py/source/pyext.cpp @@ -244,7 +244,9 @@ void pyext::DoExit() Py_DECREF(pyobj); // opposite of SetClssMeth } - if(gcrun) collect(); + if(gcrun && !collect()) { + post("%s - Unloading: Object is still referenced",thisName()); + } } void pyext::InitInOut(int &inl,int &outl) |