diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2018-03-08 13:20:19 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2018-03-08 15:28:40 -0700 |
commit | 27b8e54598a325b53fc73b2017ef5e2272f3e5f4 (patch) | |
tree | f72c4c10cdd44df371d2c40ece7a6761e71dbec8 /numpy/f2py/tests | |
parent | 0311fa97057979384f5cc182d325ad6042e6b363 (diff) | |
download | numpy-27b8e54598a325b53fc73b2017ef5e2272f3e5f4.tar.gz |
MAINT: Hard tab and whitespace cleanup.
Diffstat (limited to 'numpy/f2py/tests')
-rw-r--r-- | numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c | 26 | ||||
-rw-r--r-- | numpy/f2py/tests/test_semicolon_split.py | 12 |
2 files changed, 19 insertions, 19 deletions
diff --git a/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c b/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c index 22801abdc..7f46303b0 100644 --- a/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c +++ b/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c @@ -33,7 +33,7 @@ Required arguments:\n" "Return objects:\n" " arr : array"; static PyObject *f2py_rout_wrap_call(PyObject *capi_self, - PyObject *capi_args) { + PyObject *capi_args) { PyObject * volatile capi_buildvalue = NULL; int type_num = 0; npy_intp *dims = NULL; @@ -45,7 +45,7 @@ static PyObject *f2py_rout_wrap_call(PyObject *capi_self, int i; if (!PyArg_ParseTuple(capi_args,"iOiO|:wrap.call",\ - &type_num,&dims_capi,&intent,&arr_capi)) + &type_num,&dims_capi,&intent,&arr_capi)) return NULL; rank = PySequence_Length(dims_capi); dims = malloc(rank*sizeof(npy_intp)); @@ -78,7 +78,7 @@ Required arguments:\n" " itemsize : int\n" ; static PyObject *f2py_rout_wrap_attrs(PyObject *capi_self, - PyObject *capi_args) { + PyObject *capi_args) { PyObject *arr_capi = Py_None; PyArrayObject *arr = NULL; PyObject *dimensions = NULL; @@ -87,7 +87,7 @@ static PyObject *f2py_rout_wrap_attrs(PyObject *capi_self, int i; memset(s,0,100*sizeof(char)); if (!PyArg_ParseTuple(capi_args,"O!|:wrap.attrs", - &PyArray_Type,&arr_capi)) + &PyArray_Type,&arr_capi)) return NULL; arr = (PyArrayObject *)arr_capi; sprintf(s,"%p",PyArray_DATA(arr)); @@ -98,15 +98,15 @@ static PyObject *f2py_rout_wrap_attrs(PyObject *capi_self, PyTuple_SetItem(strides,i,PyInt_FromLong(PyArray_STRIDE(arr,i))); } return Py_BuildValue("siOOO(cciii)ii",s,PyArray_NDIM(arr), - dimensions,strides, - (PyArray_BASE(arr)==NULL?Py_None:PyArray_BASE(arr)), - PyArray_DESCR(arr)->kind, - PyArray_DESCR(arr)->type, - PyArray_TYPE(arr), - PyArray_ITEMSIZE(arr), - PyArray_DESCR(arr)->alignment, - PyArray_FLAGS(arr), - PyArray_ITEMSIZE(arr)); + dimensions,strides, + (PyArray_BASE(arr)==NULL?Py_None:PyArray_BASE(arr)), + PyArray_DESCR(arr)->kind, + PyArray_DESCR(arr)->type, + PyArray_TYPE(arr), + PyArray_ITEMSIZE(arr), + PyArray_DESCR(arr)->alignment, + PyArray_FLAGS(arr), + PyArray_ITEMSIZE(arr)); } static PyMethodDef f2py_module_methods[] = { diff --git a/numpy/f2py/tests/test_semicolon_split.py b/numpy/f2py/tests/test_semicolon_split.py index d844e2eae..2b0f32727 100644 --- a/numpy/f2py/tests/test_semicolon_split.py +++ b/numpy/f2py/tests/test_semicolon_split.py @@ -9,14 +9,14 @@ class TestMultiline(util.F2PyTest): code = """ python module {module} usercode ''' -void foo(int* x) {{ +void foo(int* x) {{ char dummy = ';'; - *x = 42; + *x = 42; }} ''' interface subroutine foo(x) - intent(c) foo + intent(c) foo integer intent(out) :: x end subroutine foo end interface @@ -37,11 +37,11 @@ void foo(int* x) {{ ''' interface subroutine foo(x) - intent(c) foo + intent(c) foo integer intent(out) :: x - callprotoargument int* + callprotoargument int* callstatement {{ & - ; & + ; & x = 42; & }} end subroutine foo |