Commit 04e462aa authored by Stefan Behnel's avatar Stefan Behnel

minor code cleanup

parent 9350e5ca
...@@ -2034,27 +2034,29 @@ def p_calling_convention(s): ...@@ -2034,27 +2034,29 @@ def p_calling_convention(s):
else: else:
return "" return ""
calling_convention_words = cython.declare( calling_convention_words = cython.declare(
set, set(["__stdcall", "__cdecl", "__fastcall"])) set, set(["__stdcall", "__cdecl", "__fastcall"]))
def p_c_complex_base_type(s, templates = None): def p_c_complex_base_type(s, templates = None):
# s.sy == '(' # s.sy == '('
pos = s.position() pos = s.position()
s.next() s.next()
base_type = p_c_base_type(s, templates = templates) base_type = p_c_base_type(s, templates=templates)
declarator = p_c_declarator(s, empty = 1) declarator = p_c_declarator(s, empty=True)
type_node = Nodes.CComplexBaseTypeNode(pos, type_node = Nodes.CComplexBaseTypeNode(
base_type = base_type, declarator = declarator) pos, base_type=base_type, declarator=declarator)
if s.sy == ',': if s.sy == ',':
components = [type_node] components = [type_node]
while s.sy == ',': while s.sy == ',':
s.next() s.next()
if s.sy == ')': if s.sy == ')':
break break
base_type = p_c_base_type(s, templates = templates) base_type = p_c_base_type(s, templates=templates)
declarator = p_c_declarator(s, empty = 1) declarator = p_c_declarator(s, empty=True)
components.append(Nodes.CComplexBaseTypeNode(pos, components.append(Nodes.CComplexBaseTypeNode(
base_type = base_type, declarator = declarator)) pos, base_type=base_type, declarator=declarator))
type_node = Nodes.CTupleBaseTypeNode(pos, components = components) type_node = Nodes.CTupleBaseTypeNode(pos, components = components)
s.expect(')') s.expect(')')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment