Fix bug in cdef locals
authorRobert Bradshaw <robertwb@math.washington.edu>
Sun, 1 Mar 2009 12:12:46 +0000 (04:12 -0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Sun, 1 Mar 2009 12:12:46 +0000 (04:12 -0800)
Cython/Compiler/Nodes.py
Cython/Compiler/Parsing.py

index 76cef6e484ec867031bf69cab02a220d6f370998..96fd424cd44c72e97fab2096524bba7ded7058ff 100644 (file)
@@ -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):
index e6415fb50e6d98bfb8da46338596579930ffb248..7b4dc98687b179747c9ab044e0472d30ddae004c 100644 (file)
@@ -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")