Showing the changes to python/lib/gen_code.py (1 of 101 files). Show all
Unified · Split
| @@ -234,11 +234,21 @@ typedef struct{{ · 233 unmodified lines | |||
| 234 | return out.format(do_inputs_list = do_inputs_list, **self.__dict__) | 234 | return out.format(do_inputs_list = do_inputs_list, **self.__dict__) |
| 235 | 235 | ||
| 236 | def gen_doc(self): | 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 | out = """ | 242 | out = """ |
| 238 | // TODO: add documentation | 243 | #ifndef PYAUBIO_{shortname}_doc |
| 239 | static char Py_{shortname}_doc[] = \"undefined\"; | 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 | def gen_new(self): | 253 | def gen_new(self): |
| 244 | out = """ | 254 | out = """ |