Showing the changes to python/lib/gen_code.py (1 of 1 file). Show all
Unified · Split
| @@ -231,11 +231,21 @@ typedef struct{{ · 230 unmodified lines | |||
| 231 | return out.format(do_inputs_list = do_inputs_list, **self.__dict__) | 231 | return out.format(do_inputs_list = do_inputs_list, **self.__dict__) |
| 232 | 232 | ||
| 233 | def gen_doc(self): | 233 | def gen_doc(self): |
| 234 | sig = [] | ||
| 235 | for p in self.input_params: | ||
| 236 | name = p['name'] | ||
| 237 | defval = aubiodefvalue[name].replace('"','\\\"') | ||
| 238 | sig.append("{name}={defval}".format(defval=defval, name=name)) | ||
| 234 | out = """ | 239 | out = """ |
| 235 | // TODO: add documentation | 240 | #ifndef PYAUBIO_{shortname}_doc |
| 236 | static char Py_{shortname}_doc[] = \"undefined\"; | 241 | #define PYAUBIO_{shortname}_doc "{shortname}({sig})" |
| 242 | #endif /* PYAUBIO_{shortname}_doc */ | ||
| 243 | |||
| 244 | static char Py_{shortname}_doc[] = "" | ||
| 245 | PYAUBIO_{shortname}_doc | ||
| 246 | ""; | ||
| 237 | """ | 247 | """ |
| 238 | return out.format(**self.__dict__) | 248 | return out.format(sig=', '.join(sig), **self.__dict__) |
| 239 | 249 | ||
| 240 | def gen_new(self): | 250 | def gen_new(self): |
| 241 | out = """ | 251 | out = """ |