History

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

Paul Brossier committed 13 years ago

Commit 3a678941 parent 4a95f831 file · +2 −2Browse files

Showing the changes to python (1 of 1 file). Show all

Unified · Split

python/lib/gen_pyobject.py+2−2
@@ -477,7 +477,7 @@ Py%(funcname)s (Py_%(objname)s *self, PyObject *args) · 476 unmodified lines
477}477}
478""" % {'funcname': method_name, 'objname': name, 478""" % {'funcname': method_name, 'objname': name,
479 'out_type': out_type, 'setter_args': setter_args, 'parse_args': parse_args }479 'out_type': out_type, 'setter_args': setter_args, 'parse_args': parse_args }
480 shortname = method_name.split(name+'_')[-1]480 shortname = method_name.split('aubio_'+name+'_')[-1]
481 method_defs += """\481 method_defs += """\
482 {"%(shortname)s", (PyCFunction) Py%(method_name)s,482 {"%(shortname)s", (PyCFunction) Py%(method_name)s,
483 METH_VARARGS, ""},483 METH_VARARGS, ""},
@@ -493,7 +493,7 @@ Py%(funcname)s (Py_%(objname)s *self, PyObject *args) · 9 unmodified lines
493 "get method has more than one parameter %s" % params493 "get method has more than one parameter %s" % params
494 getter_args = "self->o" 494 getter_args = "self->o"
495 returnval = "(PyObject *)" + aubiovectopyobj[out_type] + " (tmp)"495 returnval = "(PyObject *)" + aubiovectopyobj[out_type] + " (tmp)"
496 shortname = method_name.split(name+'_')[-1]496 shortname = method_name.split('aubio_'+name+'_')[-1]
497 method_defs += """\497 method_defs += """\
498 {"%(shortname)s", (PyCFunction) Py%(method_name)s,498 {"%(shortname)s", (PyCFunction) Py%(method_name)s,
499 METH_NOARGS, ""},499 METH_NOARGS, ""},

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t