From 45da6684cbe9bd2fe199b0fd75a40f1c219b6341 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Tue, 20 Sep 2005 20:50:40 +0000 Subject: *** empty log message *** svn path=/trunk/; revision=3607 --- externals/grill/py/build/config-win.def | 2 +- externals/grill/py/py.vcproj | 6 +++--- externals/grill/py/readme.txt | 4 +++- externals/grill/py/source/clmeth.cpp | 11 ++++++++--- externals/grill/py/source/pybase.cpp | 2 ++ externals/grill/py/source/pydsp.cpp | 3 +++ externals/grill/py/source/pyext.cpp | 15 +++++++-------- 7 files changed, 27 insertions(+), 16 deletions(-) (limited to 'externals/grill') diff --git a/externals/grill/py/build/config-win.def b/externals/grill/py/build/config-win.def index a4f0569e..40ac5ff5 100644 --- a/externals/grill/py/build/config-win.def +++ b/externals/grill/py/build/config-win.def @@ -2,7 +2,7 @@ PYTHONVER=24 # where is the Python installation? -PYTHONPATH=c:/programme/prog/python$(PYTHONVER) +PYTHONPATH=%programfiles%/python$(PYTHONVER) # uncomment if numarray support should be compiled in # for info about numarray see http://numeric.scipy.org diff --git a/externals/grill/py/py.vcproj b/externals/grill/py/py.vcproj index 31e24d3c..d82a132f 100644 --- a/externals/grill/py/py.vcproj +++ b/externals/grill/py/py.vcproj @@ -85,7 +85,7 @@ use PD 0.38 or the devel_0_37 cvs branch instead +- It has been reported that pyext crashes on AMD64 with SSE enabled (for these CPUs, disable the respective compiler flags) ---------------------------------------------------------------------------- @@ -99,7 +100,8 @@ Version history: - FIX: better exception handling (no longer leaves reference to function object) and cleared misleading error message - FIX: better definition of output values for atoms, lists and anythings - FIX: much better detached method handling (one thread for all object instances!) -- ADD: open module file in editor on "edit" message (or alt-click (PD) or double click (Max)) +- ADD: open module file in editor on "edit" message (or shift-click (PD) or double click (Max)) +- FIX: _inlets and _outlets default to 0 if not given 0.2.0: - ADD: handling of Python threads 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); -- cgit v1.2.1