Commit 781ef52c authored by Stefan Behnel's avatar Stefan Behnel

allow splitting compiler annotation decorators as Python only allows 255 args

parent 727cf655
...@@ -485,6 +485,10 @@ class InterpretCompilerDirectives(CythonTransform, SkipDeclarations): ...@@ -485,6 +485,10 @@ class InterpretCompilerDirectives(CythonTransform, SkipDeclarations):
options.reverse() # Decorators coming first take precedence options.reverse() # Decorators coming first take precedence
for option in options: for option in options:
name, value = option name, value = option
if name in optdict:
# assuming it's a dict ...
optdict[name].update(value)
else:
optdict[name] = value optdict[name] = value
body = StatListNode(node.pos, stats=[node]) body = StatListNode(node.pos, stats=[node])
return self.visit_with_options(body, optdict) return self.visit_with_options(body, optdict)
......
...@@ -67,7 +67,8 @@ def test_address(x): ...@@ -67,7 +67,8 @@ def test_address(x):
y = cython.address(x) y = cython.address(x)
return y[0] 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): def test_locals(x):
y = x y = x
return y return y
......
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