Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
cython
Commits
ff12be26
Commit
ff12be26
authored
Dec 13, 2010
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add --disable-function-redefinition for legacy code.
parent
b16fceca
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
1 deletion
+7
-1
Cython/Compiler/CmdLine.py
Cython/Compiler/CmdLine.py
+2
-0
Cython/Compiler/Options.py
Cython/Compiler/Options.py
+4
-0
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+1
-1
No files found.
Cython/Compiler/CmdLine.py
View file @
ff12be26
...
...
@@ -125,6 +125,8 @@ def parse_command_line(args):
options
.
language_level
=
3
elif
option
==
"--fast-fail"
:
Options
.
fast_fail
=
True
elif
option
==
"--disable-function-redefinition"
:
Options
.
disable_function_redefinition
=
True
elif
option
in
(
"-X"
,
"--directive"
):
try
:
options
.
compiler_directives
=
Options
.
parse_directive_list
(
...
...
Cython/Compiler/Options.py
View file @
ff12be26
...
...
@@ -51,6 +51,10 @@ c_line_in_traceback = 1
# executes the body of this module.
embed
=
False
# Disables function redefinition, allowing all functions to be declared at
# module creation time. For legacy code only.
disable_function_redefinition
=
False
# Declare compiler directives
directive_defaults
=
{
...
...
Cython/Compiler/Symtab.py
View file @
ff12be26
...
...
@@ -526,7 +526,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:
if not allow_redefine
or Options.disable_function_redefinition
:
return self._declare_pyfunction(name, pos, visibility=visibility, entry=entry)
if entry:
if entry.type.is_unspecified:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment