aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2013-12-20 19:28:18 +0100
committerKevin Wolf <kwolf@redhat.com>2014-01-22 12:07:18 +0100
commit8592a545b61b99114a86ee7cecef7a5f284d1b6c (patch)
treea8081ed01160cedb89c4be590fa1da3f2597c74a
parent22511ad681348cc4e500ebafdc324b0909d41c95 (diff)
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>
-rw-r--r--scripts/qapi.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/qapi.py b/scripts/qapi.py
index 750e9fb552..9b3de4c7c3 100644
--- a/scripts/qapi.py
+++ b/scripts/qapi.py
@@ -247,7 +247,7 @@ def c_var(name, protect=True):
'and', 'and_eq', 'bitand', 'bitor', 'compl', 'not',
'not_eq', 'or', 'or_eq', 'xor', 'xor_eq'])
# 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):
return "q_" + name
return name.replace('-', '_').lstrip("*")