提交 1057725f 编写于 作者: P Paolo Bonzini 提交者: Luiz Capitulino

qapi: add "unix" to the set of reserved words

It is #defined to 1.
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
上级 eda50a65
......@@ -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("*")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册