diff options
Diffstat (limited to 'externals/grill/py/source')
-rw-r--r-- | externals/grill/py/source/clmeth.cpp | 11 | ||||
-rw-r--r-- | externals/grill/py/source/pybase.cpp | 2 | ||||
-rw-r--r-- | externals/grill/py/source/pydsp.cpp | 3 | ||||
-rw-r--r-- | externals/grill/py/source/pyext.cpp | 15 |
4 files changed, 20 insertions, 11 deletions
diff --git a/externals/grill/py/source/clmeth.cpp b/externals/grill/py/source/clmeth.cpp index 0dff50e9..30474eff 100644 --- a/externals/grill/py/source/clmeth.cpp +++ b/externals/grill/py/source/clmeth.cpp @@ -165,6 +165,7 @@ PyObject *pyext::pyext_outlet(PyObject *,PyObject *args) (outl = PyTuple_GET_ITEM(args,1)) != NULL && PyInt_Check(outl) ) { pyext *ext = GetThis(self); + FLEXT_ASSERT(ext); PyObject *val; #if 0 @@ -229,7 +230,8 @@ PyObject *pyext::pyext_detach(PyObject *,PyObject *args) } else { pyext *ext = GetThis(self); - ext->detach = val; + FLEXT_ASSERT(ext); + ext->detach = val; } Py_INCREF(Py_None); @@ -252,7 +254,8 @@ PyObject *pyext::pyext_stop(PyObject *,PyObject *args) } else { pyext *ext = GetThis(self); - int cnt; + FLEXT_ASSERT(ext); + int cnt; t_atom at; if(val >= 0) cnt = 1,flext::SetInt(at,val); else cnt = 0; @@ -292,7 +295,7 @@ PyObject *pyext::pyext_tocanvas(PyObject *,PyObject *args) (self = PyTuple_GET_ITEM(args,0)) != NULL && PyInstance_Check(self) ) { pyext *ext = GetThis(self); - + FLEXT_ASSERT(ext); PyObject *val; bool tp = @@ -348,6 +351,7 @@ PyObject *pyext::pyext_invec(PyObject *,PyObject *args) } else { pyext *ext = GetThis(self); + FLEXT_ASSERT(ext); PyObject *b = ext->GetSig(val,true); if(b) return b; } @@ -371,6 +375,7 @@ PyObject *pyext::pyext_outvec(PyObject *,PyObject *args) } else { pyext *ext = GetThis(self); + FLEXT_ASSERT(ext); PyObject *b = ext->GetSig(val,false); if(b) return b; } diff --git a/externals/grill/py/source/pybase.cpp b/externals/grill/py/source/pybase.cpp index 462cad62..b7a112e9 100644 --- a/externals/grill/py/source/pybase.cpp +++ b/externals/grill/py/source/pybase.cpp @@ -171,7 +171,9 @@ void pybase::lib_setup() FLEXT_SETUP(pyobj);
FLEXT_SETUP(pymeth);
FLEXT_SETUP(pyext);
+#ifndef PY_NODSP
FLEXT_DSP_SETUP(pydsp);
+#endif
#ifdef FLEXT_THREADS
// release global lock
diff --git a/externals/grill/py/source/pydsp.cpp b/externals/grill/py/source/pydsp.cpp index b7459a59..a88a3956 100644 --- a/externals/grill/py/source/pydsp.cpp +++ b/externals/grill/py/source/pydsp.cpp @@ -8,6 +8,8 @@ WARRANTIES, see the file, "license.txt," in this distribution. */
+#ifndef PY_NODSP
+
#include "pyext.h"
class pydsp
@@ -185,3 +187,4 @@ PyObject *pydsp::GetSig(int ix,bool in) return r;
}
+#endif
diff --git a/externals/grill/py/source/pyext.cpp b/externals/grill/py/source/pyext.cpp index dd4b5a67..633d4007 100644 --- a/externals/grill/py/source/pyext.cpp +++ b/externals/grill/py/source/pyext.cpp @@ -207,14 +207,13 @@ bool pyext::Init() else inlets = outlets = 0; - if(inlets < 0 || outlets < 0) - InitProblem(); - else { - AddInSignal(siginlets); - AddInAnything((siginlets?0:1)+inlets); - AddOutSignal(sigoutlets); - AddOutAnything(outlets); - } + if(inlets < 0) inlets = 0; + if(outlets < 0) outlets = 0; + + AddInSignal(siginlets); + AddInAnything((siginlets?0:1)+inlets); + AddOutSignal(sigoutlets); + AddOutAnything(outlets); Report(); PyUnlock(state); |