diff options
-rw-r--r-- | Cython/Compiler/Options.py | 2 | ||||
-rw-r--r-- | Cython/Compiler/ParseTreeTransforms.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Cython/Compiler/Options.py b/Cython/Compiler/Options.py index 1a00bcc54..13d07b495 100644 --- a/Cython/Compiler/Options.py +++ b/Cython/Compiler/Options.py @@ -220,7 +220,6 @@ _directive_defaults = { 'np_pythran': False, 'fast_gil': False, 'cpp_locals': False, # uses std::optional for C++ locals, so that they work more like Python locals - 'ufunc': False, 'legacy_implicit_noexcept': False, # set __file__ and/or __path__ to known source/target path at import time (instead of not having them available) @@ -328,6 +327,7 @@ directive_types = { 'binding' : bool, 'cfunc' : None, # decorators do not take directive value 'ccall' : None, + 'ufunc': None, 'cpow' : bool, 'inline' : None, 'staticmethod' : None, diff --git a/Cython/Compiler/ParseTreeTransforms.py b/Cython/Compiler/ParseTreeTransforms.py index d90ea4391..6c4275dbd 100644 --- a/Cython/Compiler/ParseTreeTransforms.py +++ b/Cython/Compiler/ParseTreeTransforms.py @@ -2399,7 +2399,7 @@ if VALUE is not None: self.seen_vars_stack.pop() - if lenv.directives.get("ufunc"): + if "ufunc" in lenv.directives: from . import UFuncs return UFuncs.convert_to_ufunc(node) return node |