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
Xavier Thompson
cython
Commits
516fe9e4
Commit
516fe9e4
authored
Jul 20, 2020
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix PyObject -> CyObject conversions in method wrappers
parent
1affddcf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
Cython/Compiler/CypclassWrapper.py
Cython/Compiler/CypclassWrapper.py
+10
-10
No files found.
Cython/Compiler/CypclassWrapper.py
View file @
516fe9e4
...
...
@@ -40,22 +40,22 @@ class CypclassWrapperInjection(Visitor.CythonTransform):
unlocked_property
=
TreeFragment
.
TreeFragment
(
u"""
property NAME:
def __get__(self):
OBJ = <TYPE>
<CyObject>
self
OBJ = <TYPE> self
return OBJ.ATTR
def __set__(self, value):
OBJ = <TYPE>
<CyObject>
self
OBJ = <TYPE> self
OBJ.ATTR = value
"""
,
level
=
'c_class'
,
pipeline
=
[
NormalizeTree
(
None
)])
locked_property
=
TreeFragment
.
TreeFragment
(
u"""
property NAME:
def __get__(self):
OBJ = <TYPE>
<CyObject>
self
OBJ = <TYPE> self
with rlocked OBJ:
value = OBJ.ATTR
return value
def __set__(self, value):
OBJ = <TYPE>
<CyObject>
self
OBJ = <TYPE> self
with wlocked OBJ:
OBJ.ATTR = value
"""
,
level
=
'c_class'
,
pipeline
=
[
NormalizeTree
(
None
)])
...
...
@@ -63,40 +63,40 @@ property NAME:
# method wrapper templates
unlocked_method
=
TreeFragment
.
TreeFragment
(
u"""
def NAME(self, ARGDECLS):
OBJ = <TYPE>
<CyObject>
self
OBJ = <TYPE> self
return OBJ.NAME(ARGS)
"""
,
level
=
'c_class'
,
pipeline
=
[
NormalizeTree
(
None
)])
unlocked_method_no_return
=
TreeFragment
.
TreeFragment
(
u"""
def NAME(self, ARGDECLS):
OBJ = <TYPE>
<CyObject>
self
OBJ = <TYPE> self
OBJ.NAME(ARGS)
"""
,
level
=
'c_class'
,
pipeline
=
[
NormalizeTree
(
None
)])
rlocked_method
=
TreeFragment
.
TreeFragment
(
u"""
def NAME(self, ARGDECLS):
OBJ = <TYPE>
<CyObject>
self
OBJ = <TYPE> self
with rlocked OBJ:
return OBJ.NAME(ARGS)
"""
,
level
=
'c_class'
,
pipeline
=
[
NormalizeTree
(
None
)])
rlocked_method_no_return
=
TreeFragment
.
TreeFragment
(
u"""
def NAME(self, ARGDECLS):
OBJ = <TYPE>
<CyObject>
self
OBJ = <TYPE> self
with rlocked OBJ:
OBJ.NAME(ARGS)
"""
,
level
=
'c_class'
,
pipeline
=
[
NormalizeTree
(
None
)])
wlocked_method
=
TreeFragment
.
TreeFragment
(
u"""
def NAME(self, ARGDECLS):
OBJ = <TYPE>
<CyObject>
self
OBJ = <TYPE> self
with wlocked OBJ:
return OBJ.NAME(ARGS)
"""
,
level
=
'c_class'
,
pipeline
=
[
NormalizeTree
(
None
)])
wlocked_method_no_return
=
TreeFragment
.
TreeFragment
(
u"""
def NAME(self, ARGDECLS):
OBJ = <TYPE>
<CyObject>
self
OBJ = <TYPE> self
with wlocked OBJ:
OBJ.NAME(ARGS)
"""
,
level
=
'c_class'
,
pipeline
=
[
NormalizeTree
(
None
)])
...
...
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