diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2005-07-09 13:03:34 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2005-07-09 13:03:34 +0000 |
commit | 29416a643b9c3d19a60b91b37a263d300c11486b (patch) | |
tree | dd28d4b6c6a6e4229de8c5e8ae76f4686df935c6 /externals/grill/py/source/pyext.cpp | |
parent | 897b80c5585f7c9031ff1aafb504c21a9d3b1606 (diff) |
python-like dotted module.function syntax
reworked outbound message generation (now with symbols instead of one-element anythings)
multiply inlets for py (hot and cold inlets)
cleaned up float vs. int pyext tags
pymeth object for object methods
enable built-in functions
sequence protocol for symbol type
enabled built-in functions
py: allow all callables
svn path=/trunk/; revision=3310
Diffstat (limited to 'externals/grill/py/source/pyext.cpp')
-rw-r--r-- | externals/grill/py/source/pyext.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/externals/grill/py/source/pyext.cpp b/externals/grill/py/source/pyext.cpp index 88b5de0c..593c8bd1 100644 --- a/externals/grill/py/source/pyext.cpp +++ b/externals/grill/py/source/pyext.cpp @@ -420,7 +420,9 @@ void pyext::m_get(const t_symbol *s) PyObject *pvar = PyObject_GetAttrString(pyobj,const_cast<char *>(GetString(s))); /* fetch bound method */ if(pvar) { flext::AtomListStatic<16> lst; - if(GetPyArgs(lst,pvar,1)) { + const t_symbol *sym = GetPyArgs(lst,pvar,1); + if(sym) { + FLEXT_ASSERT(!IsAnything(sym)); // dump value to attribute outlet SetSymbol(lst[0],s); ToOutAnything(GetOutAttr(),sym_get,lst.Count(),lst.Atoms()); @@ -469,7 +471,10 @@ void pyext::m_set(int argc,const t_atom *argv) bool pyext::CbMethodResort(int n,const t_symbol *s,int argc,const t_atom *argv) { - return (pyobj && n >= 1 && work(n,s,argc,argv)) || flext_dsp::CbMethodResort(n,s,argc,argv); + if(!n) + return flext_dsp::CbMethodResort(n,s,argc,argv); + + return pyobj && work(n,s,argc,argv); } |