Ignore:
Timestamp:
Dec 19, 2018, 6:16:29 PM (5 years ago)
Author:
Paul Brossier <piem@piem.org>
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.
Message:

Merge branch 'master' into feature/constantq

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/lib/gen_code.py

    rf87e191 r868c6b8  
    234234
    235235    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
     246static char Py_{shortname}_doc[] = ""
     247PYAUBIO_{shortname}_doc
     248"";
    239249"""
    240         return out.format(**self.__dict__)
     250        return out.format(sig=', '.join(sig), **self.__dict__)
    241251
    242252    def gen_new(self):
Note: See TracChangeset for help on using the changeset viewer.