Changeset 868c6b8 for python/lib
- Timestamp:
- Dec 19, 2018, 6:16:29 PM (6 years ago)
- Branches:
- feature/constantq
- Children:
- dfe6ab6
- Parents:
- f87e191 (diff), fda3394 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/lib/gen_code.py
rf87e191 r868c6b8 234 234 235 235 def gen_doc(self): 236 out = """ 237 // TODO: add documentation 238 static char Py_{shortname}_doc[] = \"undefined\"; 236 sig = [] 237 for p in self.input_params: 238 name = p['name'] 239 defval = aubiodefvalue[name].replace('"','\\\"') 240 sig.append("{name}={defval}".format(defval=defval, name=name)) 241 out = """ 242 #ifndef PYAUBIO_{shortname}_doc 243 #define PYAUBIO_{shortname}_doc "{shortname}({sig})" 244 #endif /* PYAUBIO_{shortname}_doc */ 245 246 static char Py_{shortname}_doc[] = "" 247 PYAUBIO_{shortname}_doc 248 ""; 239 249 """ 240 return out.format( **self.__dict__)250 return out.format(sig=', '.join(sig), **self.__dict__) 241 251 242 252 def gen_new(self):
Note: See TracChangeset
for help on using the changeset viewer.