From: Matthias Bolte Date: Tue, 31 May 2011 08:41:37 +0000 (+0200) Subject: Ignore backward compatibility macros in apibuild.py X-Git-Tag: CVE-2011-2178~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1767c8d79e9b90c15e07387a62ea1ab5aacff718;p=thirdparty%2Flibvirt.git Ignore backward compatibility macros in apibuild.py This fixes this three warnings from the parser by allowing the parser to ignore some macros in the same way as it can ignore functions. Parsing ./../include/libvirt/libvirt.h Misformatted macro comment for _virSchedParameter Expecting '* _virSchedParameter:' got '* virSchedParameter:' Misformatted macro comment for _virBlkioParameter Expecting '* _virBlkioParameter:' got '* virBlkioParameter:' Misformatted macro comment for _virMemoryParameter Expecting '* _virMemoryParameter:' got '* virMemoryParameter:' --- diff --git a/docs/apibuild.py b/docs/apibuild.py index 2ab05999cf..f160c478aa 100755 --- a/docs/apibuild.py +++ b/docs/apibuild.py @@ -58,6 +58,12 @@ ignored_functions = { "virEventRemoveTimeout": "internal function in event.c", } +ignored_macros = { + "_virSchedParameter": "backward compatibility macro for virTypedParameter", + "_virBlkioParameter": "backward compatibility macro for virTypedParameter", + "_virMemoryParameter": "backward compatibility macro for virTypedParameter", +} + def escape(raw): raw = string.replace(raw, '&', '&') raw = string.replace(raw, '<', '<') @@ -716,8 +722,12 @@ class CParser: # Parse a comment block associate to a macro # def parseMacroComment(self, name, quiet = 0): + global ignored_macros + if name[0:2] == '__': quiet = 1 + if ignored_macros.has_key(name): + quiet = 1 args = [] desc = ""