Commit ce6a1255 authored by Robert Bradshaw's avatar Robert Bradshaw

Fix 551, ctypedef'ing templated types.

parent e874badb
...@@ -2687,8 +2687,6 @@ def p_ctypedef_statement(s, ctx): ...@@ -2687,8 +2687,6 @@ def p_ctypedef_statement(s, ctx):
return p_c_struct_or_union_definition(s, pos, ctx) return p_c_struct_or_union_definition(s, pos, ctx)
else: else:
base_type = p_c_base_type(s, nonempty = 1) base_type = p_c_base_type(s, nonempty = 1)
if base_type.name is None:
s.error("Syntax error in ctypedef statement")
declarator = p_c_declarator(s, ctx, is_type = 1, nonempty = 1) declarator = p_c_declarator(s, ctx, is_type = 1, nonempty = 1)
s.expect_newline("Syntax error in ctypedef statement") s.expect_newline("Syntax error in ctypedef statement")
return Nodes.CTypeDefNode( return Nodes.CTypeDefNode(
......
...@@ -31,3 +31,7 @@ cdef char f = d.getValue2() ...@@ -31,3 +31,7 @@ cdef char f = d.getValue2()
f = e.getValue2() f = e.getValue2()
del b, e del b, e
ctypedef TemplateTest1[int] TemplateTest1_int
cdef TemplateTest1_int aa
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