Showing the changes to python/lib (1 of 101 files). Show all
Unified · Split
| @@ -234,11 +234,21 @@ typedef struct{{ · 233 unmodified lines | ||
| 234 | 234 | return out.format(do_inputs_list = do_inputs_list, **self.__dict__) |
| 235 | 235 | |
| 236 | 236 | 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)) | |
| 237 | 242 | 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 | +""; | |
| 240 | 250 | """ |
| 241 | − return out.format(**self.__dict__) | |
| 251 | + return out.format(sig=', '.join(sig), **self.__dict__) | |
| 242 | 252 | |
| 243 | 253 | def gen_new(self): |
| 244 | 254 | out = """ |