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
7497e401
Commit
7497e401
authored
Apr 10, 2019
by
gsamain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Basic test for multiple inheritance
parent
89b7f63b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
0 deletions
+49
-0
nogil_test/cypclass_test_multiple_inheritance.pyx
nogil_test/cypclass_test_multiple_inheritance.pyx
+34
-0
nogil_test/cypclass_test_multiple_inheritance_distutil.py
nogil_test/cypclass_test_multiple_inheritance_distutil.py
+15
-0
No files found.
nogil_test/cypclass_test_multiple_inheritance.pyx
0 → 100644
View file @
7497e401
cdef
cypclass
A
:
int
a
void
__init__
(
self
,
int
arg
=
0
):
self
.
a
=
arg
A
__iadd__
(
self
,
A
other
):
self
.
a
+=
other
.
a
int
getter
(
self
):
return
self
.
a
cdef
cypclass
B
:
int
b
void
__init__
(
self
,
int
arg
=
0
):
self
.
b
=
arg
B
__isub__
(
self
,
B
other
):
self
.
b
-=
other
.
b
int
getter
(
self
):
return
self
.
b
cdef
cypclass
C
(
A
,
B
):
void
__init__
(
self
,
int
arg
=
0
):
self
.
a
=
self
.
b
=
arg
cpdef
bag
():
a
=
A
(
3
)
b
=
B
(
4
)
c
=
C
(
5
)
c
+=
a
c
-=
b
return
str
(
a
.
a
)
+
'
\
n
'
+
str
(
b
.
b
)
+
'
\
n
'
+
str
(
c
.
a
)
+
'
\
n
'
+
str
(
c
.
b
)
\
+
'
\
n
'
+
str
(
A
.
getter
(
c
))
+
'
\
n
'
+
str
(
B
.
getter
(
c
))
nogil_test/cypclass_test_multiple_inheritance_distutil.py
0 → 100644
View file @
7497e401
from
distutils.core
import
setup
from
distutils.extension
import
Extension
from
Cython.Build
import
cythonize
setup
(
ext_modules
=
cythonize
([
Extension
(
'cypclass_test_multiple_inheritance'
,
language
=
'c++'
,
sources
=
[
'cypclass_test_multiple_inheritance.pyx'
],
extra_compile_args
=
[
"-pthread"
,
"-std=c++11"
],
),
])
)
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