Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Tue, 01 Mar 2016 15:34:05 UTC Commit: 9ce7c22ad74c0d706bf857477c421320b1c9941e https://github.com/geany/geany/commit/9ce7c22ad74c0d706bf857477c421320b1c994...
Log Message: ----------- Fix Doxygen generation instead of working around incorrect output
Make Doxygen ignore `G_{BEGIN,END}_DECLS` and `GEANY_API_SYMBOL` itself instead of stripping those manually when parsing the XML output.
This makes Doxygen parsing more robust by ignoring some odd C syntax, and also improves the HTML version removing some incorrect C code references.
Modified Paths: -------------- doc/Doxyfile.in scripts/gen-api-gtkdoc.py
Modified: doc/Doxyfile.in 3 lines changed, 3 insertions(+), 0 deletions(-) =================================================================== @@ -2035,7 +2035,10 @@ INCLUDE_FILE_PATTERNS = # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
PREDEFINED = "G_GNUC_PRINTF(x,y)=" \ + G_BEGIN_DECLS= \ + G_END_DECLS= \ HAVE_PLUGINS \ + GEANY_API_SYMBOL= \ GEANY_FUNCTIONS_H
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
Modified: scripts/gen-api-gtkdoc.py 8 lines changed, 4 insertions(+), 4 deletions(-) =================================================================== @@ -281,7 +281,7 @@ class DoxyTypedef(DoxyElement): @staticmethod def from_memberdef(xml): name = xml.find("name").text - d = normalize_text(xml.find("definition").text).replace("G_BEGIN_DECLS", "") + d = normalize_text(xml.find("definition").text) d += ";" return DoxyTypedef(name, d)
@@ -338,9 +338,9 @@ class DoxyFunction(DoxyElement): @staticmethod def from_memberdef(xml): name = xml.find("name").text - d = normalize_text(xml.find("definition").text.replace("G_BEGIN_DECLS", "")) + d = normalize_text(xml.find("definition").text) d += " " + xml.find("argsstring").text + ";" - d = normalize_text(d.replace("GEANY_API_SYMBOL", "")) + d = normalize_text(d)
e = DoxyFunction(name, d) e.add_brief(xml.find("briefdescription")) @@ -385,7 +385,7 @@ def main(args): for f in h_files: if not (f.find("compoundname").text.endswith("private.h")): for n0 in f.xpath(".//*/memberdef[@kind='typedef' and @prot='public']"): - if not (n0.find("type").text.replace("G_BEGIN_DECLS", "").lstrip().startswith("enum")): + if not (n0.find("type").text.startswith("enum")): e = DoxyTypedef.from_memberdef(n0) typedefs.append(e)
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).