[Scipy-svn] r2199 - trunk/Lib/ndimage/src

scipy-svn at scipy.org scipy-svn at scipy.org
Fri Sep 15 15:24:29 CDT 2006


Author: stefan
Date: 2006-09-15 15:24:08 -0500 (Fri, 15 Sep 2006)
New Revision: 2199

Modified:
   trunk/Lib/ndimage/src/nd_image.c
   trunk/Lib/ndimage/src/ni_filters.c
   trunk/Lib/ndimage/src/ni_filters.h
Log:
Fix ndimage for 64-bit systems (by Matthew Brett).


Modified: trunk/Lib/ndimage/src/nd_image.c
===================================================================
--- trunk/Lib/ndimage/src/nd_image.c	2006-09-14 09:29:55 UTC (rev 2198)
+++ trunk/Lib/ndimage/src/nd_image.c	2006-09-15 20:24:08 UTC (rev 2199)
@@ -305,7 +305,7 @@
   long origin, filter_size;
   double cval;
   
-  if (!PyArg_ParseTuple(args, "O&OiiO&idlOO", NI_ObjectToInputArray, 
+  if (!PyArg_ParseTuple(args, "O&OliO&idlOO", NI_ObjectToInputArray, 
         &input, &fnc, &filter_size, &axis, NI_ObjectToOutputArray, 
         &output, &mode, &cval, &origin, &extra_arguments, &extra_keywords))
     goto exit;

Modified: trunk/Lib/ndimage/src/ni_filters.c
===================================================================
--- trunk/Lib/ndimage/src/ni_filters.c	2006-09-14 09:29:55 UTC (rev 2198)
+++ trunk/Lib/ndimage/src/ni_filters.c	2006-09-15 20:24:08 UTC (rev 2199)
@@ -274,9 +274,9 @@
 }
 
 int
-NI_UniformFilter1D(PyArrayObject *input, maybelong filter_size,
+NI_UniformFilter1D(PyArrayObject *input, long filter_size,
                    int axis, PyArrayObject *output, NI_ExtendMode mode,
-                   double cval, maybelong origin)
+                   double cval, long origin)
 {
   maybelong lines, kk, ll, length, size1, size2;
   int more;
@@ -336,9 +336,9 @@
 }
 
 int
-NI_MinOrMaxFilter1D(PyArrayObject *input, maybelong filter_size,
+NI_MinOrMaxFilter1D(PyArrayObject *input, long filter_size,
                     int axis, PyArrayObject *output, NI_ExtendMode mode,
-                    double cval, maybelong origin, int minimum)
+                    double cval, long origin, int minimum)
 {
   maybelong lines, kk, jj, ll, length, size1, size2;
   int more;
@@ -705,8 +705,8 @@
 
 int NI_GenericFilter1D(PyArrayObject *input,
         int (*function)(double*, maybelong, double*, maybelong, void*),
-        void* data, maybelong filter_size, int axis, PyArrayObject *output, 
-        NI_ExtendMode mode, double cval, maybelong origin)
+        void* data, long filter_size, int axis, PyArrayObject *output, 
+        NI_ExtendMode mode, double cval, long origin)
 {
   int more;
   maybelong ii, lines, length, size1, size2;

Modified: trunk/Lib/ndimage/src/ni_filters.h
===================================================================
--- trunk/Lib/ndimage/src/ni_filters.h	2006-09-14 09:29:55 UTC (rev 2198)
+++ trunk/Lib/ndimage/src/ni_filters.h	2006-09-15 20:24:08 UTC (rev 2199)
@@ -36,18 +36,18 @@
                    NI_ExtendMode, double, maybelong);
 int NI_Correlate(PyArrayObject*, PyArrayObject*, PyArrayObject*,
                  NI_ExtendMode, double, maybelong*);
-int NI_UniformFilter1D(PyArrayObject*, maybelong, int, PyArrayObject*,
-                       NI_ExtendMode, double, maybelong);
-int NI_MinOrMaxFilter1D(PyArrayObject*, maybelong, int, PyArrayObject*,
-                        NI_ExtendMode, double, maybelong, int);
+int NI_UniformFilter1D(PyArrayObject*, long, int, PyArrayObject*,
+                       NI_ExtendMode, double, long);
+int NI_MinOrMaxFilter1D(PyArrayObject*, long, int, PyArrayObject*,
+                        NI_ExtendMode, double, long, int);
 int NI_MinOrMaxFilter(PyArrayObject*, PyArrayObject*, PyArrayObject*,
                       PyArrayObject*, NI_ExtendMode, double, maybelong*,
                       int);
 int NI_RankFilter(PyArrayObject*, int, PyArrayObject*, PyArrayObject*,
                   NI_ExtendMode, double, maybelong*);
 int NI_GenericFilter1D(PyArrayObject*, int (*)(double*, maybelong, 
-                       double*, maybelong, void*), void*, maybelong, int,
-                       PyArrayObject*, NI_ExtendMode, double, maybelong);
+                       double*, maybelong, void*), void*, long, int,
+                       PyArrayObject*, NI_ExtendMode, double, long);
 int NI_GenericFilter(PyArrayObject*, int (*)(double*, maybelong, double*,
                      void*), void*, PyArrayObject*, PyArrayObject*,
                      NI_ExtendMode, double, maybelong*);



More information about the Scipy-svn mailing list