From: Stefan Behnel Date: Tue, 15 Sep 2009 06:31:37 +0000 (+0200) Subject: allow splitting compiler annotation decorators as Python only allows 255 args X-Git-Tag: 0.12.alpha0~203 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=781ef52cad9730c396b34dc28b4f06f7a48368fa;p=cython.git allow splitting compiler annotation decorators as Python only allows 255 args --- diff --git a/Cython/Compiler/ParseTreeTransforms.py b/Cython/Compiler/ParseTreeTransforms.py index d01d06da..1637dee2 100644 --- a/Cython/Compiler/ParseTreeTransforms.py +++ b/Cython/Compiler/ParseTreeTransforms.py @@ -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: diff --git a/tests/run/pure.pyx b/tests/run/pure.pyx index 38910a8e..3013dada 100644 --- a/tests/run/pure.pyx +++ b/tests/run/pure.pyx @@ -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