From 8649fe6ae185e215d25a7e4ef693f5c262c2f09f Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Sun, 1 Mar 2009 04:12:46 -0800 Subject: [PATCH] Fix bug in cdef locals --- Cython/Compiler/Nodes.py | 3 +++ Cython/Compiler/Parsing.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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") -- 2.26.2