fix merging keyword arguments in compiler directive decorators
authorStefan Behnel <scoder@users.berlios.de>
Tue, 15 Sep 2009 06:59:58 +0000 (08:59 +0200)
committerStefan Behnel <scoder@users.berlios.de>
Tue, 15 Sep 2009 06:59:58 +0000 (08:59 +0200)
Cython/Compiler/ParseTreeTransforms.py

index 1637dee22274c198ef78dcd159bef713a1e4a8df..5dad37861a784fadd3b84e965ed16dd5064b9aa1 100644 (file)
@@ -485,8 +485,9 @@ class InterpretCompilerDirectives(CythonTransform, SkipDeclarations):
             options.reverse() # Decorators coming first take precedence
             for option in options:
                 name, value = option
-                if name in optdict:
-                    # assuming it's a dict ...
+                if name in optdict and isinstance(optdict[name], dict):
+                    # only keywords can be merged, everything else
+                    # overrides completely
                     optdict[name].update(value)
                 else:
                     optdict[name] = value