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/clmeth.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/clmeth.cpp')
-rw-r--r-- | externals/grill/py/source/clmeth.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/externals/grill/py/source/clmeth.cpp b/externals/grill/py/source/clmeth.cpp index 303b5888..37ba257e 100644 --- a/externals/grill/py/source/clmeth.cpp +++ b/externals/grill/py/source/clmeth.cpp @@ -182,7 +182,7 @@ PyObject *pyext::pyext_outlet(PyObject *,PyObject *args) // offset outlet by signal outlets o += ext->sigoutlets; - if(ext->OutObject(ext,o,val)) + if(ext->OutObject(ext,o-1,val)) ok = true; else PyErr_SetString(PyExc_ValueError,"pyext - _outlet: invalid arguments"); @@ -295,11 +295,12 @@ PyObject *pyext::pyext_tocanvas(PyObject *,PyObject *args) val = PyTuple_GetSlice(args,1,sz); // new ref flext::AtomListStatic<16> lst; - if(GetPyArgs(lst,val)) { + const t_symbol *sym = GetPyArgs(lst,val); + if(sym) { t_glist *gl = ext->thisCanvas(); //canvas_getcurrent(); t_class **cl = (t_pd *)gl; if(cl) - pd_forwardmess(cl,lst.Count(),lst.Atoms()); + pd_forwardmess(cl,lst.Count(),lst.Atoms()); #ifdef FLEXT_DEBUG else post("pyext - no parent canvas?!"); |