From e728a5bc3db296b4b67c2d3e5b56558c42c566a8 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Mon, 21 Jun 2004 14:08:57 +0000 Subject: "" svn path=/trunk/; revision=1826 --- externals/grill/py/source/bound.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'externals/grill/py/source/bound.cpp') diff --git a/externals/grill/py/source/bound.cpp b/externals/grill/py/source/bound.cpp index 928d7b67..9578e4c0 100644 --- a/externals/grill/py/source/bound.cpp +++ b/externals/grill/py/source/bound.cpp @@ -13,10 +13,12 @@ WARRANTIES, see the file, "license.txt," in this distribution. #include +typedef std::set FuncSet; + struct bounddata { PyObject *self; - std::set funcs; + FuncSet funcs; }; bool pyext::boundmeth(flext_base *,t_symbol *sym,int argc,t_atom *argv,void *data) @@ -25,10 +27,10 @@ bool pyext::boundmeth(flext_base *,t_symbol *sym,int argc,t_atom *argv,void *dat PY_LOCK - PyObject *args = MakePyArgs(sym,AtomList(argc,argv),-1,obj->self != NULL); + PyObject *args = MakePyArgs(sym,argc,argv,-1,obj->self != NULL); // call all functions bound by this symbol - for(std::set::iterator it = obj->funcs.begin(); it != obj->funcs.end(); ++it) { + for(FuncSet::iterator it = obj->funcs.begin(); it != obj->funcs.end(); ++it) { PyObject *ret = PyObject_CallObject(*it,args); if(!ret) { PyErr_Print(); @@ -135,7 +137,7 @@ V pyext::ClearBinding() while(GetThis(pyobj)->UnbindMethod(sym,NULL,&data)) { bounddata *bdt = (bounddata *)data; if(bdt) { - for(std::set::iterator it = bdt->funcs.begin(); it != bdt->funcs.end(); ++it) { + for(FuncSet::iterator it = bdt->funcs.begin(); it != bdt->funcs.end(); ++it) { PyObject *func = *it; if(PyMethod_Check(func)) Py_DECREF(func); } -- cgit v1.2.1