diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2005-03-13 04:59:47 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2005-03-13 04:59:47 +0000 |
commit | 3ce0fb7e8ad57909fadcd4072817d69bc54e3a66 (patch) | |
tree | f4d4478420cc9f34bf26835f2edc5bd03f95a86b /externals/grill/py/source/register.cpp | |
parent | 0e0bfeecb60ffa25d997830553685482c666b7ba (diff) |
pydsp: share dsp buffer objects at inplace operation
DSP support for py/pyext: new objects pyext~,pyx~,pyext.~,pyx.~
new base class for py and pyext classes
preset sys.argv for module loading
support for buffer objects (preliminary)
py: bang in left inlet now really triggers without arguments
fixes for detached operation and single-threaded version
little restructuring
adjust pd and py files for correct argument passing
more optimizations
update for new flext callback naming
use lock count instead of message queuing to avoid py->py messaging deadlock
pyext: fix for inlet count
svn path=/trunk/; revision=2624
Diffstat (limited to 'externals/grill/py/source/register.cpp')
-rw-r--r-- | externals/grill/py/source/register.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/externals/grill/py/source/register.cpp b/externals/grill/py/source/register.cpp index ae273955..bc2563ae 100644 --- a/externals/grill/py/source/register.cpp +++ b/externals/grill/py/source/register.cpp @@ -11,7 +11,7 @@ WARRANTIES, see the file, "license.txt," in this distribution. #include "main.h" -void py::Register(const char *regnm) +void pybase::Register(const char *regnm) { if(module) { // add this to module registry @@ -20,7 +20,7 @@ void py::Register(const char *regnm) PyObject *add = Py_BuildValue("[i]",(long)this); if(!reg || !PyList_Check(reg)) { if(PyDict_SetItemString(dict,(char *)regnm,add)) { - post("%s - Could not set registry",thisName()); + post("py/pyext - Could not set registry"); } } else { @@ -29,7 +29,7 @@ void py::Register(const char *regnm) } } -void py::Unregister(const char *regnm) +void pybase::Unregister(const char *regnm) { if(module) { // remove this from module registry @@ -37,11 +37,11 @@ void py::Unregister(const char *regnm) PyObject *reg = PyDict_GetItemString(dict,(char *)regnm); // borrowed!!! PyObject *add = Py_BuildValue("i",(int)this); if(!reg || !PySequence_Check(reg)) - post("%s - Internal error: Registry not found!?",thisName()); + post("py/pyext - Internal error: Registry not found!?"); else { int ix = PySequence_Index(reg,add); if(ix < 0) { - post("%s - Internal error: object not found in registry?!",thisName()); + post("py/pyext - Internal error: object not found in registry?!"); } else { PySequence_DelItem(reg,ix); @@ -51,7 +51,7 @@ void py::Unregister(const char *regnm) } } -void py::Reregister(const char *regnm) +void pybase::Reregister(const char *regnm) { if(module) { // remove this from module registry @@ -59,16 +59,16 @@ void py::Reregister(const char *regnm) PyObject *reg = PyDict_GetItemString(dict,(char *)regnm); // borrowed!!! if(!reg || !PySequence_Check(reg)) - post("%s - Internal error: Registry not found!?",thisName()); + post("py/pyext - Internal error: Registry not found!?"); else { int cnt = PySequence_Size(reg); for(int i = 0; i < cnt; ++i) { PyObject *it = PySequence_GetItem(reg,i); // new reference if(!it || !PyInt_Check(it)) { - post("%s - Internal error: Corrupt registry?!",thisName()); + post("py/pyext - Internal error: Corrupt registry?!"); } else { - py *th = (py *)PyInt_AsLong(it); + pybase *th = (pybase *)PyInt_AsLong(it); th->module = module; th->dict = dict; th->Reload(); |