diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2005-07-08 14:30:31 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2005-07-08 14:30:31 +0000 |
commit | 897b80c5585f7c9031ff1aafb504c21a9d3b1606 (patch) | |
tree | eaab38174de9e018827634ed079a885e232097a4 /externals/grill/py/source/clmeth.cpp | |
parent | 6efb16b9040f7ba6db8c60559e0c815d54f05c43 (diff) |
better reload handling, but still far fom perfect
fixed minor other issues
cleaned up float vs. int pyext tags
simplifications in py and pyext
bumped version number
python-like dotted module.function syntax
send and receive wrapped PyObjects through inlets/outlets
multiply inlets for py (hot and cold inlets)
svn path=/trunk/; revision=3308
Diffstat (limited to 'externals/grill/py/source/clmeth.cpp')
-rw-r--r-- | externals/grill/py/source/clmeth.cpp | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/externals/grill/py/source/clmeth.cpp b/externals/grill/py/source/clmeth.cpp index a8e1ceb7..303b5888 100644 --- a/externals/grill/py/source/clmeth.cpp +++ b/externals/grill/py/source/clmeth.cpp @@ -177,28 +177,18 @@ PyObject *pyext::pyext_outlet(PyObject *,PyObject *args) if(!tp) val = PySequence_GetSlice(args,2,sz); // new ref - flext::AtomListStatic<16> lst; - if(GetPyArgs(lst,val)) { - int o = PyInt_AsLong(outl); - if(o >= 1 && o <= ext->Outlets()) { - // offset outlet by signal outlets - o += ext->sigoutlets; - - // by using the queue there is no immediate call of the next object - // deadlock would occur if this was another py/pyext object! - if(lst.Count() && IsSymbol(lst[0])) - ext->ToOutAnything(o-1,GetSymbol(lst[0]),lst.Count()-1,lst.Atoms()+1); - else if(lst.Count() > 1) - ext->ToOutList(o-1,lst); - else - ext->ToOutAtom(o-1,*lst.Atoms()); + int o = PyInt_AsLong(outl); + if(o >= 1 && o <= ext->Outlets()) { + // offset outlet by signal outlets + o += ext->sigoutlets; + + if(ext->OutObject(ext,o,val)) ok = true; - } - else - PyErr_SetString(PyExc_ValueError,"pyext - _outlet: index out of range"); + else + PyErr_SetString(PyExc_ValueError,"pyext - _outlet: invalid arguments"); } - else - PyErr_SetString(PyExc_ValueError,"pyext - _outlet: invalid arguments"); + else + PyErr_SetString(PyExc_ValueError,"pyext - _outlet: index out of range"); if(!tp) Py_DECREF(val); } |