History

Merge branch 'master' into feature/pitchshift

Paul Brossier committed 7 years ago

Commit d0f19a72 parents 34d4232 0045668101 files · +1797 −1448Browse files

Showing the changes to python/lib/gen_code.py (1 of 101 files). Show all

Unified · Split

python/lib/gen_code.py+13−3
@@ -234,11 +234,21 @@ typedef struct{{ · 233 unmodified lines
234234 return out.format(do_inputs_list = do_inputs_list, **self.__dict__)
235235
236236 def gen_doc(self):
237+ sig = []
238+ for p in self.input_params:
239+ name = p['name']
240+ defval = aubiodefvalue[name].replace('"','\\\"')
241+ sig.append("{name}={defval}".format(defval=defval, name=name))
237242 out = """
238−// TODO: add documentation
239−static char Py_{shortname}_doc[] = \"undefined\";
243+#ifndef PYAUBIO_{shortname}_doc
244+#define PYAUBIO_{shortname}_doc "{shortname}({sig})"
245+#endif /* PYAUBIO_{shortname}_doc */
246+
247+static char Py_{shortname}_doc[] = ""
248+PYAUBIO_{shortname}_doc
249+"";
240250 """
241− return out.format(**self.__dict__)
251+ return out.format(sig=', '.join(sig), **self.__dict__)
242252
243253 def gen_new(self):
244254 out = """

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