From 897b80c5585f7c9031ff1aafb504c21a9d3b1606 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Fri, 8 Jul 2005 14:30:31 +0000 Subject: 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 --- externals/grill/py/source/clmeth.cpp | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) (limited to 'externals/grill/py/source/clmeth.cpp') 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); } -- cgit v1.2.1