Skip to content
This repository
Browse code

Added cast to error check, and fixed indentation.

  • Loading branch information...
commit 78f66726040a87d3d0955f1d437c5a7c745bc632 1 parent 120c6bd
Eric Fode authored July 15, 2012

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. 5  numpy/core/src/multiarray/common.c
5  numpy/core/src/multiarray/common.c
@@ -36,8 +36,9 @@ _array_find_python_scalar_type(PyObject *op)
36 36
         /* if integer can fit into a longlong then return that*/
37 37
         if ((PyLong_AsLongLong(op) == -1) && PyErr_Occurred()) {
38 38
             PyErr_Clear();
39  
-        if((PyLong_AsUnsignedLongLong(op) == -1) && PyErr_Occurred()){
40  
-            PyErr_Clear();
  39
+            if ((PyLong_AsUnsignedLongLong(op) == (unsigned long long) -1) 
  40
+                    && PyErr_Occurred()){
  41
+                PyErr_Clear();
41 42
         } 
42 43
         else {
43 44
             return PyArray_DescrFromType(NPY_ULONGLONG);

0 notes on commit 78f6672

Please sign in to comment.
Something went wrong with that request. Please try again.