From 3a67894b0f2ad0acad96890e2422602656376850 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Mon, 18 Mar 2013 02:05:29 -0500 Subject: [PATCH] python/lib/gen_pyobject.py: fix shortname of methods with multiple _ --- python/lib/gen_pyobject.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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, ""}, -- 2.26.2