mirror of https://github.com/xqemu/xqemu.git
qapi: Add "errno" to the list of polluted words
Using "errno" directly as an identifier results in various syntax errors; therefore it should be added to the list of polluted words. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
22511ad681
commit
8592a545b6
|
@ -247,7 +247,7 @@ def c_var(name, protect=True):
|
||||||
'and', 'and_eq', 'bitand', 'bitor', 'compl', 'not',
|
'and', 'and_eq', 'bitand', 'bitor', 'compl', 'not',
|
||||||
'not_eq', 'or', 'or_eq', 'xor', 'xor_eq'])
|
'not_eq', 'or', 'or_eq', 'xor', 'xor_eq'])
|
||||||
# namespace pollution:
|
# namespace pollution:
|
||||||
polluted_words = set(['unix'])
|
polluted_words = set(['unix', 'errno'])
|
||||||
if protect and (name in c89_words | c99_words | c11_words | gcc_words | cpp_words | polluted_words):
|
if protect and (name in c89_words | c99_words | c11_words | gcc_words | cpp_words | polluted_words):
|
||||||
return "q_" + name
|
return "q_" + name
|
||||||
return name.replace('-', '_').lstrip("*")
|
return name.replace('-', '_').lstrip("*")
|
||||||
|
|
Loading…
Reference in New Issue