allow splitting compiler annotation decorators as Python only allows 255 args
authorStefan Behnel <scoder@users.berlios.de>
Tue, 15 Sep 2009 06:31:37 +0000 (08:31 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Tue, 15 Sep 2009 06:31:37 +0000 (08:31 +0200)
Cython/Compiler/ParseTreeTransforms.py
tests/run/pure.pyx

index d01d06da09319af55682549a17d5a5dd49c523a0..1637dee22274c198ef78dcd159bef713a1e4a8df 100644 (file)
@@ -485,7 +485,11 @@ class InterpretCompilerDirectives(CythonTransform, SkipDeclarations):
             options.reverse() # Decorators coming first take precedence
             for option in options:
                 name, value = option
-                optdict[name] = value
+                if name in optdict:
+                    # assuming it's a dict ...
+                    optdict[name].update(value)
+                else:
+                    optdict[name] = value
             body = StatListNode(node.pos, stats=[node])
             return self.visit_with_options(body, optdict)
         else:
index 38910a8eb82de3010a5359f495a7a5f8efc37b9f..3013dada390b7a8d32006951b6bb3d2b4c0c78df 100644 (file)
@@ -67,7 +67,8 @@ def test_address(x):
     y = cython.address(x)
     return y[0]
 
-@cython.locals(x=cython.int, y=cython.bint)
+@cython.locals(x=cython.int)
+@cython.locals(y=cython.bint)
 def test_locals(x):
     y = x
     return y