Changes in python/lib/gen_code.py [c96e6c0:ce79a9e]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/lib/gen_code.py
rc96e6c0 rce79a9e 3 3 'buf_size': 'Py_default_vector_length', 4 4 'win_s': 'Py_default_vector_length', 5 'size': 'Py_default_vector_length',6 5 # and here too 7 6 'hop_size': 'Py_default_vector_length / 2', … … 84 83 'filterbank': 'self->n_filters', 85 84 'tss': 'self->buf_size', 86 'dct': 'self->size',87 85 } 88 86 … … 193 191 out += self.gen_del() 194 192 out += self.gen_do() 195 if len(self.prototypes['rdo']):196 self.do_proto = self.prototypes['rdo'][0]197 self.do_inputs = [get_params_types_names(self.do_proto)[1]]198 self.do_outputs = get_params_types_names(self.do_proto)[2:]199 out += self.gen_do(method='rdo')200 193 out += self.gen_memberdef() 201 194 out += self.gen_set() … … 378 371 return out 379 372 380 def gen_do(self , method = 'do'):373 def gen_do(self): 381 374 out = """ 382 375 // do {shortname} 383 376 static PyObject* 384 Py aubio_{shortname}_{method}(Py_{shortname} * self, PyObject * args)385 {{""".format(**self.__dict__ , method = method)377 Py_{shortname}_do (Py_{shortname} * self, PyObject * args) 378 {{""".format(**self.__dict__) 386 379 input_params = self.do_inputs 387 380 output_params = self.do_outputs … … 523 516 {{"{shortname}", (PyCFunction) Py{name}, 524 517 METH_NOARGS, ""}},""".format(name = name, shortname = shortname) 525 for m in self.prototypes['rdo']:526 name = get_name(m)527 shortname = name.replace('aubio_%s_' % self.shortname, '')528 out += """529 {{"{shortname}", (PyCFunction) Py{name},530 METH_VARARGS, ""}},""".format(name = name, shortname = shortname)531 518 out += """ 532 519 {NULL} /* sentinel */ … … 554 541 0, 555 542 0, 556 (ternaryfunc)Py aubio_{shortname}_do,543 (ternaryfunc)Py_{shortname}_do, 557 544 0, 558 545 0,
Note: See TracChangeset
for help on using the changeset viewer.