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:
a3deac0
)
Get rid of "comparison between signed and unsigned" warning.
author
Robert Bradshaw
<robertwb@gmail.com>
Sun, 22 Sep 2013 03:59:50 +0000
(20:59 -0700)
committer
Robert Bradshaw
<robertwb@gmail.com>
Sun, 22 Sep 2013 04:00:06 +0000
(21:00 -0700)
Cython/Utility/TypeConversion.c
patch
|
blob
|
history
diff --git
a/Cython/Utility/TypeConversion.c
b/Cython/Utility/TypeConversion.c
index
b937e2b
..
eba0a6a
100644
(file)
--- a/
Cython/Utility/TypeConversion.c
+++ b/
Cython/Utility/TypeConversion.c
@@
-454,7
+454,7
@@
static CYTHON_INLINE PyObject* {{TO_PY_FUNCTION}}({{TYPE}} value) {
{ \
value_type value = func(x); \
if (sizeof(type) < sizeof(value_type)) { \
- if (unlikely(value != (
type) value)) {
\
+ if (unlikely(value != (
value_type) (type) value)) {
\
PyErr_SetString(PyExc_OverflowError, \
(is_unsigned && unlikely(value < 0)) ? \
"can't convert negative value to " #type : \