diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2012-09-19 16:31:07 +0200 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2012-09-26 10:45:02 -0300 |
commit | 1057725f6629fc2771a294a92ce8eedb92c86fe8 (patch) | |
tree | 76149eeeb7025650877dc2fa7ffbf7aca2708fba | |
parent | eda50a656f52a5172fa8a95f7b217565b90d413e (diff) |
qapi: add "unix" to the set of reserved words
It is #defined to 1.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
-rw-r--r-- | scripts/qapi.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/qapi.py b/scripts/qapi.py index 057332e4ca..afc5f32aeb 100644 --- a/scripts/qapi.py +++ b/scripts/qapi.py @@ -156,7 +156,9 @@ def c_var(name, protect=True): # GCC http://gcc.gnu.org/onlinedocs/gcc-4.7.1/gcc/C-Extensions.html # excluding _.* gcc_words = set(['asm', 'typeof']) - if protect and (name in c89_words | c99_words | c11_words | gcc_words): + # namespace pollution: + polluted_words = set(['unix']) + if protect and (name in c89_words | c99_words | c11_words | gcc_words | polluted_words): return "q_" + name return name.replace('-', '_').lstrip("*") |