From 94a7d440501ad10c1fbfc05402251b8b5ccda88b Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Wed, 13 Feb 2013 21:32:32 -0800 Subject: [PATCH] Remove archaic disable_function_redefinition option. --- Cython/Compiler/CmdLine.py | 2 -- Cython/Compiler/Options.py | 4 ---- Cython/Compiler/Symtab.py | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/Cython/Compiler/CmdLine.py b/Cython/Compiler/CmdLine.py index e8a8e4e..e41d813 100644 --- a/Cython/Compiler/CmdLine.py +++ b/Cython/Compiler/CmdLine.py @@ -137,8 +137,6 @@ def parse_command_line(args): Options.warning_errors = True elif option in ('-Wextra', '--warning-extra'): options.compiler_directives.update(Options.extra_warnings) - elif option == "--disable-function-redefinition": - Options.disable_function_redefinition = True elif option == "--old-style-globals": Options.old_style_globals = True elif option == "--directive" or option.startswith('-X'): diff --git a/Cython/Compiler/Options.py b/Cython/Compiler/Options.py index a29c889..f3ef009 100644 --- a/Cython/Compiler/Options.py +++ b/Cython/Compiler/Options.py @@ -55,10 +55,6 @@ lookup_module_cpdef = False # executes the body of this module. embed = None -# Disables function redefinition, allowing all functions to be declared at -# module creation time. For legacy code only, needed for some circular imports. -disable_function_redefinition = False - # In previous iterations of Cython, globals() gave the first non-Cython module # globals in the call stack. Sage relies on this behavior for variable injection. old_style_globals = False diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py index afa4da7..d87feb3 100644 --- a/Cython/Compiler/Symtab.py +++ b/Cython/Compiler/Symtab.py @@ -631,7 +631,7 @@ class Scope(object): def declare_pyfunction(self, name, pos, allow_redefine=False, visibility='extern'): # Add an entry for a Python function. entry = self.lookup_here(name) - if not allow_redefine or Options.disable_function_redefinition: + if not allow_redefine: return self._declare_pyfunction(name, pos, visibility=visibility, entry=entry) if entry: if entry.type.is_unspecified: -- 2.7.4