From e610feedafe4209b18b8c9ac918b285571b6b37b Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Tue, 15 Sep 2009 08:59:58 +0200 Subject: [PATCH] fix merging keyword arguments in compiler directive decorators --- Cython/Compiler/ParseTreeTransforms.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Cython/Compiler/ParseTreeTransforms.py b/Cython/Compiler/ParseTreeTransforms.py index 1637dee2..5dad3786 100644 --- a/Cython/Compiler/ParseTreeTransforms.py +++ b/Cython/Compiler/ParseTreeTransforms.py @@ -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 -- 2.26.2