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
6af2d10e
Commit
6af2d10e
authored
Jan 05, 2019
by
mattip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MAINT: make attribute names unique to prove c-getters are being used
parent
64c45122
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
tests/run/ext_attr_getter.srctree
tests/run/ext_attr_getter.srctree
+4
-4
No files found.
tests/run/ext_attr_getter.srctree
View file @
6af2d10e
...
...
@@ -123,15 +123,15 @@ def sum(Foo f):
cdef extern from "foo.h":
ctypedef class foo_extension.Foo [object FooStructOpaque, check_size ignore]:
@property
cdef int field0(self):
cdef int field
M
0(self):
return PyFoo_GET0M(self)
@property
cdef int field1(self):
cdef int field
F
1(self):
return PyFoo_Get1F(self)
@property
cdef int field2(self):
cdef int field
M
2(self):
return PyFoo_GET2M(self)
int PyFoo_GET0M(Foo); # this is actually a macro !
...
...
@@ -141,7 +141,7 @@ cdef extern from "foo.h":
def sum(Foo f):
# Note - not a cdef function but compiling the f.__getattr__('field0')
# notices the getter and replaces the __getattr__ in c by PyFoo_GET anyway
return f.field
0 + f.field1 + f.field
2
return f.field
M0 + f.fieldF1 + f.fieldM
2
######## getter_fail0.pyx ########
...
...
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