summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorArink Verma <arinkverma@gmail.com>2013-08-31 02:59:35 +0530
committerArink Verma <arinkverma@gmail.com>2013-08-31 02:59:35 +0530
commit7ed2c9bfdcd2eded4c42ec485cce8e6e3a69308c (patch)
tree50cdc9fef73ee3b887be8ddadee1c6cf5460e7e2 /numpy
parentd334dbd400964515bb392f3f9d7978d0ddb2a9a6 (diff)
downloadnumpy-7ed2c9bfdcd2eded4c42ec485cce8e6e3a69308c.tar.gz
Check for error value by PyLong_AsUnsignedLong as (unsigned long)-1
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/scalarmathmodule.c.src2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/src/scalarmathmodule.c.src b/numpy/core/src/scalarmathmodule.c.src
index c4bb082dc..7c0846ff7 100644
--- a/numpy/core/src/scalarmathmodule.c.src
+++ b/numpy/core/src/scalarmathmodule.c.src
@@ -795,7 +795,7 @@ _@name@_convert_to_ctype(PyObject *a, @type@ *arg1)
if(PyLong_CheckExact(a)) {
*arg1 = PyLong_AsUnsignedLong(a);
- if (*arg1 == -1 && PyErr_Occurred()) {
+ if (*arg1 == (unsigned long)-1 && PyErr_Occurred()) {
return -1;
}
else {