1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-10 05:17:59 +03:00

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:'
This commit is contained in:
Matthias Bolte 2011-05-31 10:41:37 +02:00
parent 155542a57f
commit 1767c8d79e

View File

@ -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 = ""