projects
/
platform
/
upstream
/
python-cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0cae661
)
fix C compiler warning in overflow tests
author
Stefan Behnel
<stefan_ml@behnel.de>
Sat, 9 Nov 2013 07:10:37 +0000
(08:10 +0100)
committer
Stefan Behnel
<stefan_ml@behnel.de>
Sat, 9 Nov 2013 07:10:37 +0000
(08:10 +0100)
tests/run/overflow_check.pxi
patch
|
blob
|
history
diff --git
a/tests/run/overflow_check.pxi
b/tests/run/overflow_check.pxi
index
eea9f06
..
44f110e
100644
(file)
--- a/
tests/run/overflow_check.pxi
+++ b/
tests/run/overflow_check.pxi
@@
-3,7
+3,7
@@
cimport cython
cdef object two = 2
cdef int size_in_bits = sizeof(INT) * 8
-cdef bint is_signed_ =
((<INT>-1) <
0)
+cdef bint is_signed_ =
not ((<INT>-1) >
0)
cdef INT max_value_ = <INT>(two ** (size_in_bits - is_signed_) - 1)
cdef INT min_value_ = ~max_value_
cdef INT half_ = max_value_ // <INT>2