Permalink
Browse files

Added cast to error check, and fixed indentation.

  • Loading branch information...
1 parent 120c6bd commit 78f66726040a87d3d0955f1d437c5a7c745bc632 @ericfode ericfode committed Jul 15, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 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);

0 comments on commit 78f6672

Please sign in to comment.