From 8eb4299c5b5dac419b769d2e6581707cec47ea6b Mon Sep 17 00:00:00 2001 From: Marcus Comstedt Date: Sun, 8 Nov 2015 17:37:34 +0100 Subject: [PATCH] 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. --- bindings/cxx/Doxyfile | 2 +- bindings/swig/doc.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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':