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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
276aee06
Commit
276aee06
authored
Feb 13, 2008
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Warning when overriding cdef method with def method. (Perhaps this should be an error?)
parent
ad4b2066
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+6
-1
No files found.
Cython/Compiler/Nodes.py
View file @
276aee06
...
...
@@ -874,7 +874,8 @@ class CFuncDefNode(FuncDefNode):
star_arg
=
None
,
starstar_arg
=
None
,
doc
=
self
.
doc
,
body
=
py_func_body
)
body
=
py_func_body
,
is_wrapper
=
1
)
self
.
py_func
.
is_module_scope
=
env
.
is_module_scope
self
.
py_func
.
analyse_declarations
(
env
)
self
.
entry
.
as_variable
=
self
.
py_func
.
entry
...
...
@@ -1054,6 +1055,7 @@ class DefNode(FuncDefNode):
num_kwonly_args
=
0
num_required_kw_args
=
0
reqd_kw_flags_cname
=
"0"
is_wrapper
=
0
def
__init__
(
self
,
pos
,
**
kwds
):
FuncDefNode
.
__init__
(
self
,
pos
,
**
kwds
)
...
...
@@ -1185,6 +1187,9 @@ class DefNode(FuncDefNode):
def
declare_pyfunction
(
self
,
env
):
#print "DefNode.declare_pyfunction:", self.name, "in", env ###
name
=
self
.
name
entry
=
env
.
lookup_here
(
self
.
name
)
if
entry
and
entry
.
type
.
is_cfunction
and
not
self
.
is_wrapper
:
warning
(
self
.
pos
,
"Overriding cdef method with def method."
,
5
)
entry
=
env
.
declare_pyfunction
(
self
.
name
,
self
.
pos
)
self
.
entry
=
entry
prefix
=
env
.
scope_prefix
...
...
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