Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added cast to error check, and fixed indentation.

  • Loading branch information...
commit 78f66726040a87d3d0955f1d437c5a7c745bc632 1 parent 120c6bd
@ericfode ericfode authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 numpy/core/src/multiarray/common.c
View
5 numpy/core/src/multiarray/common.c
@@ -36,8 +36,9 @@ _array_find_python_scalar_type(PyObject *op)
/* if integer can fit into a longlong then return that*/
if ((PyLong_AsLongLong(op) == -1) && PyErr_Occurred()) {
PyErr_Clear();
- if((PyLong_AsUnsignedLongLong(op) == -1) && PyErr_Occurred()){
- PyErr_Clear();
+ if ((PyLong_AsUnsignedLongLong(op) == (unsigned long long) -1)
+ && PyErr_Occurred()){
+ PyErr_Clear();
}
else {
return PyArray_DescrFromType(NPY_ULONGLONG);
Please sign in to comment.
Something went wrong with that request. Please try again.