Commit 8649fe6a authored by Robert Bradshaw's avatar Robert Bradshaw

Fix bug in cdef locals

parent 10849f5c
......@@ -772,10 +772,13 @@ class CVarDefNode(StatNode):
# api boolean
# need_properties [entry]
# decorators [cython.locals(...)] or None
# directive_locals { string : NameNode } locals defined by cython.locals(...)
child_attrs = ["base_type", "declarators"]
need_properties = ()
decorators = None
directive_locals = {}
def analyse_declarations(self, env, dest_scope = None):
......
......@@ -1479,7 +1479,7 @@ def p_IF_statement(s, ctx):
def p_statement(s, ctx, first_statement = 0):
cdef_flag = ctx.cdef_flag
decorators = []
decorators = None
if s.sy == 'ctypedef':
if ctx.level not in ('module', 'module_pxd'):
s.error("ctypedef statement not allowed here")
......
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