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
2bc8d9cb
Commit
2bc8d9cb
authored
Jan 14, 2010
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests for inc/dec and deref
parent
e27de484
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
tests/run/unop_extras.pyx
tests/run/unop_extras.pyx
+22
-0
No files found.
tests/run/unop_extras.pyx
0 → 100644
View file @
2bc8d9cb
cimport
cython
def
test_deref
(
int
x
):
"""
>>> test_deref(3)
3
>>> test_deref(5)
5
"""
cdef
int
*
x_ptr
=
&
x
return
cython
.
dereference
(
x_ptr
)
def
increment_decrement
(
int
x
):
"""
>>> increment_decrement(10)
11 11 12
11 11 10
10
"""
print
cython
.
preincrement
(
x
),
cython
.
postincrement
(
x
),
x
print
cython
.
predecrement
(
x
),
cython
.
postdecrement
(
x
),
x
return
x
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