summaryrefslogtreecommitdiff
path: root/numpy/doc/swig
diff options
context:
space:
mode:
authorwfspotz@sandia.gov <wfspotz@sandia.gov@localhost>2007-09-13 17:41:01 +0000
committerwfspotz@sandia.gov <wfspotz@sandia.gov@localhost>2007-09-13 17:41:01 +0000
commit8497bf45e1ce1d9e9310ea80a288438a446d41c2 (patch)
treebfbe5173ea3d5e37a92b647171bfb17e2e1ead69 /numpy/doc/swig
parent844e856b73448b4dceb35b35ac95eae2adc517c9 (diff)
downloadnumpy-8497bf45e1ce1d9e9310ea80a288438a446d41c2.tar.gz
Fixed C++ code to be C-compliant
Diffstat (limited to 'numpy/doc/swig')
-rw-r--r--numpy/doc/swig/numpy.i8
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/doc/swig/numpy.i b/numpy/doc/swig/numpy.i
index 3550a1800..92b80e298 100644
--- a/numpy/doc/swig/numpy.i
+++ b/numpy/doc/swig/numpy.i
@@ -683,14 +683,14 @@ int require_size(PyArrayObject* ary, npy_intp* size, int n) {
}
%typemap(in)
(DATA_TYPE* INPLACE_ARRAY1, DIM_TYPE DIM1)
- (PyArrayObject* array=NULL)
+ (PyArrayObject* array=NULL, int i=1)
{
array = obj_to_array_no_conversion($input, DATA_TYPECODE);
if (!array || !require_dimensions(array,1) || !require_contiguous(array)
|| !require_native(array)) SWIG_fail;
$1 = (DATA_TYPE*) array_data(array);
$2 = 1;
- for (int i=0; i < array_numdims(array); ++i) $2 *= array_size(array,i);
+ for (i=0; i < array_numdims(array); ++i) $2 *= array_size(array,i);
}
/* Typemap suite for (DIM_TYPE DIM1, DATA_TYPE* INPLACE_ARRAY1)
@@ -702,13 +702,13 @@ int require_size(PyArrayObject* ary, npy_intp* size, int n) {
}
%typemap(in)
(DIM_TYPE DIM1, DATA_TYPE* INPLACE_ARRAY1)
- (PyArrayObject* array=NULL)
+ (PyArrayObject* array=NULL, int i=0)
{
array = obj_to_array_no_conversion($input, DATA_TYPECODE);
if (!array || !require_dimensions(array,1) || !require_contiguous(array)
|| !require_native(array)) SWIG_fail;
$1 = 1;
- for (int i=0; i < array_numdims(array); ++i) $1 *= array_size(array,i);
+ for (i=0; i < array_numdims(array); ++i) $1 *= array_size(array,i);
$2 = (DATA_TYPE*) array_data(array);
}