[Numpy-svn] r3327 - trunk/numpy/core/src

numpy-svn at scipy.org numpy-svn at scipy.org
Fri Oct 13 13:54:06 CDT 2006


Author: oliphant
Date: 2006-10-13 13:54:02 -0500 (Fri, 13 Oct 2006)
New Revision: 3327

Modified:
   trunk/numpy/core/src/arrayobject.c
   trunk/numpy/core/src/scalartypes.inc.src
   trunk/numpy/core/src/ufuncobject.c
Log:
Fixes from 64-bit warnings in ticket #337

Modified: trunk/numpy/core/src/arrayobject.c
===================================================================
--- trunk/numpy/core/src/arrayobject.c	2006-10-13 18:45:44 UTC (rev 3326)
+++ trunk/numpy/core/src/arrayobject.c	2006-10-13 18:54:02 UTC (rev 3327)
@@ -9282,7 +9282,8 @@
         else {
                 if (start < -self->size || start >= self->size) {
                         PyErr_Format(PyExc_ValueError,
-                                     "index (%d) out of range", start);
+                                     "index (%" NPY_INTP_FMT \
+                                     ") out of range", start);
                         goto finish;
                 }
                 retval = 0;

Modified: trunk/numpy/core/src/scalartypes.inc.src
===================================================================
--- trunk/numpy/core/src/scalartypes.inc.src	2006-10-13 18:45:44 UTC (rev 3326)
+++ trunk/numpy/core/src/scalartypes.inc.src	2006-10-13 18:54:02 UTC (rev 3327)
@@ -830,7 +830,7 @@
 static PyObject *
 gentype_imag_get(PyObject *self)
 {
-        PyArray_Descr *typecode;
+        PyArray_Descr *typecode=NULL;
         PyObject *ret;
         int typenum;
 
@@ -861,7 +861,7 @@
                 PyDataMem_FREE(temp);
         }
 
-        Py_DECREF(typecode);
+        Py_XDECREF(typecode);
         return ret;
 }
 

Modified: trunk/numpy/core/src/ufuncobject.c
===================================================================
--- trunk/numpy/core/src/ufuncobject.c	2006-10-13 18:45:44 UTC (rev 3326)
+++ trunk/numpy/core/src/ufuncobject.c	2006-10-13 18:54:02 UTC (rev 3327)
@@ -791,8 +791,8 @@
 		PyErr_Format(PyExc_ValueError,
 			     "buffer size (%d) is not in range "
                              "(%"INTP_FMT" - %"INTP_FMT") or not a multiple of 16",
-			     *bufsize, PyArray_MIN_BUFSIZE,
-			     PyArray_MAX_BUFSIZE);
+			     *bufsize, (intp) PyArray_MIN_BUFSIZE,
+			     (intp) PyArray_MAX_BUFSIZE);
 		return -1;
 	}
 



More information about the Numpy-svn mailing list