diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2005-07-15 16:13:43 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2005-07-15 16:13:43 +0000 |
commit | ad9d49bf213f525d122656fc7dc55287b9ae00f0 (patch) | |
tree | dab21d5be62c5c96a862278e15932c3aabb3c0a8 /externals/grill/py/source/pyargs.cpp | |
parent | 0ba6ec4c3bca4a58f287ecaa50ee116f268459ea (diff) |
None returned by script will bang the output
fixes for atomic pyext._outlet messages
svn path=/trunk/; revision=3346
Diffstat (limited to 'externals/grill/py/source/pyargs.cpp')
-rw-r--r-- | externals/grill/py/source/pyargs.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/externals/grill/py/source/pyargs.cpp b/externals/grill/py/source/pyargs.cpp index 5c903f17..2957801d 100644 --- a/externals/grill/py/source/pyargs.cpp +++ b/externals/grill/py/source/pyargs.cpp @@ -130,12 +130,15 @@ const t_symbol *pybase::GetPyArgs(AtomList &lst,PyObject *pValue,int offs) { if(pValue == NULL) return false; + // output bang on None returned + if(pValue == Py_None) return sym_bang; + // analyze return value or tuple int rargc = 0; retval tp = nothing; - if(PyString_Check(pValue)) { + if(PyString_Check(pValue) || pySymbol_Check(pValue)) { rargc = 1; tp = atom; } @@ -143,8 +146,8 @@ const t_symbol *pybase::GetPyArgs(AtomList &lst,PyObject *pValue,int offs) rargc = PySequence_Size(pValue); tp = sequ; } - else if(pValue != Py_None) { - rargc = 1; + else { + rargc = 1; tp = atom; } // else |