提交 1767c8d7 编写于 作者: M Matthias Bolte

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:'
上级 155542a5
......@@ -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, '<', '&lt;')
......@@ -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 = ""
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册