Ignore:
Timestamp:
Dec 19, 2018, 7:31:27 PM (6 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/cnn, feature/crepe, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master
Children:
0770148, cb0d7d0
Parents:
34d4232 (diff), 0045668 (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/pitchshift

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/lib/gen_code.py

    r34d4232 rd0f19a7  
    235235
    236236    def gen_doc(self):
    237         out = """
    238 // TODO: add documentation
    239 static char Py_{shortname}_doc[] = \"undefined\";
     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))
     242        out = """
     243#ifndef PYAUBIO_{shortname}_doc
     244#define PYAUBIO_{shortname}_doc "{shortname}({sig})"
     245#endif /* PYAUBIO_{shortname}_doc */
     246
     247static char Py_{shortname}_doc[] = ""
     248PYAUBIO_{shortname}_doc
     249"";
    240250"""
    241         return out.format(**self.__dict__)
     251        return out.format(sig=', '.join(sig), **self.__dict__)
    242252
    243253    def gen_new(self):
Note: See TracChangeset for help on using the changeset viewer.