From: Marcus Comstedt Date: Sun, 8 Nov 2015 16:37:34 +0000 (+0100) Subject: bindings: Fix doc extraction for enums X-Git-Tag: libsigrok-0.4.0~83 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=8eb4299c5b5dac419b769d2e6581707cec47ea6b;p=libsigrok.git bindings: Fix doc extraction for enums The source file enum.hpp was not found when not building in the source tree. Also, extraction of the brief description did not work correctly when there was additional XML markup inside the element. --- diff --git a/bindings/cxx/Doxyfile b/bindings/cxx/Doxyfile index 8008db2f..7fb0854f 100644 --- a/bindings/cxx/Doxyfile +++ b/bindings/cxx/Doxyfile @@ -744,7 +744,7 @@ WARN_LOGFILE = # Note: If this tag is empty the current directory is searched. INPUT = include/libsigrokcxx/libsigrokcxx.hpp \ - include/libsigrokcxx/enums.hpp + $(BUILDDIR)include/libsigrokcxx/enums.hpp # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/bindings/swig/doc.py b/bindings/swig/doc.py index b9e20ade..f71493d4 100644 --- a/bindings/swig/doc.py +++ b/bindings/swig/doc.py @@ -30,7 +30,7 @@ index = ElementTree.parse(input_file) def get_text(node): paras = node.findall('para') - return str.join('\n\n', [p.text.rstrip() for p in paras if p.text]) + return str.join('\n\n', [("".join(l)).rstrip() for l in [list(p.itertext()) for p in paras] if l]) for compound in index.findall('compound'): if compound.attrib['kind'] != 'class':