Commit f020a6d2 authored by Robert Bradshaw's avatar Robert Bradshaw

cdef extern structs may be c++ classes, can refer to themselves

parent 779b34dd
......@@ -790,6 +790,7 @@ class CStructOrUnionDefNode(StatNode):
self.entry.defined_in_pxd = 1
for attr in self.attributes:
attr.analyse_declarations(env, scope)
if self.visibility != 'extern':
for attr in scope.var_entries:
type = attr.type
while type.is_array:
......@@ -801,7 +802,7 @@ class CStructOrUnionDefNode(StatNode):
type = type.base_type
if type == self.entry.type:
need_typedef_indirection = True
if need_typedef_indirection and self.visibility != 'extern':
if need_typedef_indirection:
# C can't handle typedef structs that refer to themselves.
struct_entry = self.entry
cname = env.new_const_cname()
......
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