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
1bcdc48d
Commit
1bcdc48d
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
9916752e
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 @
1bcdc48d
...
...
@@ -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