shithub: aubio

Download patch

ref: 3a67894b0f2ad0acad96890e2422602656376850
parent: 4a95f83758b4fe4f3f8ddce88447701f50705eef
author: Paul Brossier <piem@piem.org>
date: Sun Mar 17 22:05:29 EDT 2013

python/lib/gen_pyobject.py: fix shortname of methods with multiple _

--- a/python/lib/gen_pyobject.py
+++ b/python/lib/gen_pyobject.py
@@ -477,7 +477,7 @@
 }
 """ % {'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 @@
             "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, ""},