From: Robert Bradshaw Date: Sun, 1 Mar 2009 12:12:46 +0000 (-0800) Subject: Fix bug in cdef locals X-Git-Tag: 0.11.rc~14 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=8649fe6ae185e215d25a7e4ef693f5c262c2f09f;p=cython.git Fix bug in cdef locals --- diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 76cef6e4..96fd424c 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -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): diff --git a/Cython/Compiler/Parsing.py b/Cython/Compiler/Parsing.py index e6415fb5..7b4dc986 100644 --- a/Cython/Compiler/Parsing.py +++ b/Cython/Compiler/Parsing.py @@ -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")