From: Paul Brossier Date: Mon, 18 Mar 2013 07:05:29 +0000 (-0500) Subject: python/lib/gen_pyobject.py: fix shortname of methods with multiple _ X-Git-Url: http://git.tremily.us/?p=aubio.git;a=commitdiff_plain;h=3a67894b0f2ad0acad96890e2422602656376850 python/lib/gen_pyobject.py: fix shortname of methods with multiple _ --- diff --git a/python/lib/gen_pyobject.py b/python/lib/gen_pyobject.py index 91c427ac..bb8b4f23 100644 --- a/python/lib/gen_pyobject.py +++ b/python/lib/gen_pyobject.py @@ -477,7 +477,7 @@ Py%(funcname)s (Py_%(objname)s *self, PyObject *args) } """ % {'funcname': method_name, 'objname': name, 'out_type': out_type, 'setter_args': setter_args, 'parse_args': parse_args } - shortname = method_name.split(name+'_')[-1] + shortname = method_name.split('aubio_'+name+'_')[-1] method_defs += """\ {"%(shortname)s", (PyCFunction) Py%(method_name)s, METH_VARARGS, ""}, @@ -493,7 +493,7 @@ Py%(funcname)s (Py_%(objname)s *self, PyObject *args) "get method has more than one parameter %s" % params getter_args = "self->o" returnval = "(PyObject *)" + aubiovectopyobj[out_type] + " (tmp)" - shortname = method_name.split(name+'_')[-1] + shortname = method_name.split('aubio_'+name+'_')[-1] method_defs += """\ {"%(shortname)s", (PyCFunction) Py%(method_name)s, METH_NOARGS, ""},