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/pyargs.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'externals/grill/py/source/pyargs.cpp') diff --git a/externals/grill/py/source/pyargs.cpp b/externals/grill/py/source/pyargs.cpp index 8fe68cbd..1b204273 100644 --- a/externals/grill/py/source/pyargs.cpp +++ b/externals/grill/py/source/pyargs.cpp @@ -27,7 +27,7 @@ static PyObject *MakePyAtom(const t_atom &at) return NULL; } -PyObject *py::MakePyArgs(const t_symbol *s,const AtomList &args,I inlet,BL withself) +PyObject *py::MakePyArgs(const t_symbol *s,int argc,const t_atom *argv,I inlet,BL withself) { PyObject *pArgs; @@ -41,7 +41,7 @@ PyObject *py::MakePyArgs(const t_symbol *s,const AtomList &args,I inlet,BL withs */ { BL any = IsAnything(s); - pArgs = PyTuple_New(args.Count()+(any?1:0)+(inlet >= 0?1:0)); + pArgs = PyTuple_New(argc+(any?1:0)+(inlet >= 0?1:0)); I pix = 0; @@ -54,8 +54,8 @@ PyObject *py::MakePyArgs(const t_symbol *s,const AtomList &args,I inlet,BL withs I ix; PyObject *tmp; - if(!withself || args.Count() < (any?1:2)) tmp = pArgs,ix = pix; - else tmp = PyTuple_New(args.Count()+(any?1:0)),ix = 0; + if(!withself || argc < (any?1:2)) tmp = pArgs,ix = pix; + else tmp = PyTuple_New(argc+(any?1:0)),ix = 0; if(any) { PyObject *pValue = PyString_FromString(GetString(s)); @@ -64,8 +64,8 @@ PyObject *py::MakePyArgs(const t_symbol *s,const AtomList &args,I inlet,BL withs PyTuple_SetItem(tmp, ix++, pValue); } - for(I i = 0; i < args.Count(); ++i) { - PyObject *pValue = MakePyAtom(args[i]); + for(I i = 0; i < argc; ++i) { + PyObject *pValue = MakePyAtom(argv[i]); if(!pValue) { post("py/pyext: cannot convert argument %i",any?i+1:i); continue; -- cgit v1.2.1