def analyse_declarations(self, env):
base = self.base_type.analyse(env)
name_declarator, type = self.declarator.analyse(base, env)
- name = name_declarator.name
- cname = name_declarator.cname
- entry = env.declare_typedef(name, type, self.pos,
- cname = cname, visibility = self.visibility)
+ binding = Binding()
+ binding.pull(self)
+ binding.name = name_declarator.name
+ binding.cname = name_declarator.cname
+ entry = env.WTK_declare_typedef(
+ binding, base_type = type, pos = self.pos)
if self.in_pxd and not env.in_cinclude:
entry.defined_in_pxd = 1
s.error("Syntax error in ctypedef statement")
declarator = p_c_declarator(s, ctx, is_type = 1, nonempty = 1)
s.expect_newline("Syntax error in ctypedef statement")
- visibility = 'private'
- if ctx.extern:
- visibility = 'extern'
- elif ctx.c_visibility != 'private':
- visibility = ctx.c_visibility
return Nodes.CTypeDefNode(
- pos, base_type = base_type,
- declarator = declarator, visibility = visibility,
+ pos, base_type = base_type, declarator = declarator,
+ extern = ctx.extern, visibility = ctx.visibility,
+ c_visibility = ctx.c_visibility,
in_pxd = ctx.level == 'module_pxd')
def p_decorators(s):