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
1e402dfa
Commit
1e402dfa
authored
Mar 28, 2019
by
gsamain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enhance typecast test
parent
7c022bd9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
nogil_test/cypclass_test_typecast.pyx
nogil_test/cypclass_test_typecast.pyx
+16
-2
No files found.
nogil_test/cypclass_test_typecast.pyx
View file @
1e402dfa
...
@@ -7,8 +7,22 @@ cdef cypclass SomeMemory:
...
@@ -7,8 +7,22 @@ cdef cypclass SomeMemory:
int
__int__
(
self
):
int
__int__
(
self
):
return
self
.
a
return
self
.
a
bint
__bool__
(
self
):
return
self
.
a
<
0
cdef
cypclass
SomeWrapper
:
SomeMemory
m
void
__init__
(
self
,
int
a
=
0
):
self
.
m
=
SomeMemory
()
self
.
m
.
a
=
a
SomeMemory
__SomeMemory__
(
self
):
return
self
.
m
cpdef
bag
():
cpdef
bag
():
cdef
SomeMemory
o
=
SomeMemory
()
cdef
SomeMemory
o
=
SomeMemory
()
o
.
a
=
-
1
o
.
a
=
-
1
return
str
(
<
int
>
o
)
+
'
\
n
'
+
str
(
<
unsigned
int
>
o
)
cdef
SomeWrapper
w
=
SomeWrapper
(
3
)
return
str
(
<
int
>
o
)
+
'
\
n
'
+
str
(
<
unsigned
int
>
o
)
+
'
\
n
'
+
str
(
<
bint
>
o
)
\
+
'
\
n
'
+
str
(
<
int
>
<
SomeMemory
>
w
)
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