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
46d38ea8
Commit
46d38ea8
authored
Nov 26, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
recognise when 'classmethod' gets overridden
parent
699d2353
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+4
-3
No files found.
Cython/Compiler/Symtab.py
View file @
46d38ea8
...
@@ -1184,6 +1184,9 @@ class ClassScope(Scope):
...
@@ -1184,6 +1184,9 @@ class ClassScope(Scope):
return self.outer_scope.add_string_const(value, identifier)
return self.outer_scope.add_string_const(value, identifier)
def lookup(self, name):
def lookup(self, name):
entry = Scope.lookup(self, name)
if entry:
return entry
if name == "classmethod":
if name == "classmethod":
# We don'
t
want
to
use
the
builtin
classmethod
here
'cause it won'
t
do
the
# We don'
t
want
to
use
the
builtin
classmethod
here
'cause it won'
t
do
the
# right thing in this scope (as the class memebers aren't still functions).
# right thing in this scope (as the class memebers aren't still functions).
...
@@ -1197,9 +1200,7 @@ class ClassScope(Scope):
...
@@ -1197,9 +1200,7 @@ class ClassScope(Scope):
py_object_type
,
py_object_type
,
[
PyrexTypes
.
CFuncTypeArg
(
""
,
py_object_type
,
None
)],
0
,
0
))
[
PyrexTypes
.
CFuncTypeArg
(
""
,
py_object_type
,
None
)],
0
,
0
))
entry
.
is_cfunction
=
1
entry
.
is_cfunction
=
1
return
entry
return
entry
else
:
return
Scope
.
lookup
(
self
,
name
)
class
PyClassScope
(
ClassScope
):
class
PyClassScope
(
ClassScope
):
...
...
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