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
Gwenaël Samain
cython
Commits
3b931f10
Commit
3b931f10
authored
Nov 13, 2018
by
mattip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
whoops, staticmethod is a valid cdef decorator
parent
bee7b699
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+3
-4
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/ParseTreeTransforms.py
+1
-0
tests/run/ext_attr_getter.srctree
tests/run/ext_attr_getter.srctree
+1
-1
No files found.
Cython/Compiler/Nodes.py
View file @
3b931f10
...
...
@@ -2344,11 +2344,10 @@ class CFuncDefNode(FuncDefNode):
for
decorator
in
self
.
decorators
:
func
=
decorator
.
decorator
if
func
.
is_name
:
if
func
.
name
==
'classmethod'
or
func
.
name
==
'staticmethod'
:
error
(
self
.
pos
,
"Cannot handle these decorators yet"
)
if
func
.
name
==
'property'
:
# XXX DO SOMETHING HERE???
if
func
.
name
in
(
'property'
,
'staticmethod'
):
pass
else
:
error
(
self
.
pos
,
"Cannot handle %s decorators yet"
%
func
.
name
)
self
.
is_c_class_method
=
env
.
is_c_class_scope
if
self
.
directive_locals
is
None
:
...
...
Cython/Compiler/ParseTreeTransforms.py
View file @
3b931f10
...
...
@@ -2256,6 +2256,7 @@ class ReplacePropertyNode(CythonTransform):
# done - remove the decorator node
node
.
decorators
.
remove
(
decorator_node
)
return
[
node
]
return
[
node
]
class
FindInvalidUseOfFusedTypes
(
CythonTransform
):
...
...
tests/run/ext_attr_getter.srctree
View file @
3b931f10
...
...
@@ -150,7 +150,7 @@ def sum(Foo f):
cdef extern from "foo.h":
ctypedef class foo_extension.Foo [object FooStructOpaque]:
@
static
method
@
class
method
cdef void field0():
print('in staticmethod of Foo')
...
...
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