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
85f495a5
Commit
85f495a5
authored
Mar 11, 2019
by
gsamain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding new syntax test file
parent
820f2980
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
0 deletions
+64
-0
nogil_test/test_cpp.pyx
nogil_test/test_cpp.pyx
+64
-0
No files found.
nogil_test/test_cpp.pyx
0 → 100644
View file @
85f495a5
# distutils: language = c++
#cdef class biniou:
# cdef int a
#
#cdef void genial(biniou arg):
# o = arg.a
# return
cdef
extern
from
"unistd.h"
nogil
:
unsigned
int
sleep
(
unsigned
int
seconds
)
cdef
cypclass
Rectangle
:
int
a
void
test
():
this
.
a
+=
3
void
test
(
int
a
):
this
.
a
+=
a
void
Rectangle
(
int
a
):
this
.
a
=
a
void
Rectangle
():
this
.
a
=
3
Rectangle
__iadd__
(
Rectangle
other
)
nogil
:
# sleep(3)
return
this
Rectangle
__le__
(
Rectangle
other
)
nogil
:
return
other
# void __dealloc__():
# sleep(5)
cdef
cypclass
Carre
(
Rectangle
):
int
b
void
__dealloc__
():
sleep
(
3
)
void
__init__
(
int
a
):
Rectangle
.
__init__
(
a
)
cdef
Rectangle
retour
()
nogil
:
cdef
Rectangle
o
=
Rectangle
(
12
)
# o = Rectangle(12)
return
o
cdef
void
mange
(
Rectangle
o
)
nogil
:
cdef
int
a
=
o
.
a
return
cdef
int
tipo
()
nogil
:
#cdef Rectangle c
cdef
Rectangle
o
=
Rectangle
(
32
)
#o = Rectangle(32)
c
=
o
c
=
Rectangle
(
3
)
c
+=
o
return
c
.
a
def
toto
():
print
(
tipo
())
#cdef void Rectangle::test() nogil:
# this.a += 3
#
#cdef void Rectangle::test(int a) nogil:
# this.a += a
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