From f1421a973c1d57ca8c2a6ce6ca7a20f2cf766af5 Mon Sep 17 00:00:00 2001 From: Pearu Peterson Date: Wed, 25 Jan 2006 20:00:01 +0000 Subject: Updated f2py tests to recent numpy CAPI. --- numpy/f2py/tests/array_from_pyobj/wrapmodule.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'numpy/f2py/tests/array_from_pyobj/wrapmodule.c') diff --git a/numpy/f2py/tests/array_from_pyobj/wrapmodule.c b/numpy/f2py/tests/array_from_pyobj/wrapmodule.c index ea106d9ac..07d0135cc 100644 --- a/numpy/f2py/tests/array_from_pyobj/wrapmodule.c +++ b/numpy/f2py/tests/array_from_pyobj/wrapmodule.c @@ -104,7 +104,7 @@ static PyObject *f2py_rout_wrap_attrs(PyObject *capi_self, arr->descr->elsize, arr->descr->alignment, arr->flags, - arr->itemsize); + PyArray_ITEMSIZE(arr)); } static PyMethodDef f2py_module_methods[] = { @@ -167,17 +167,19 @@ DL_EXPORT(void) initwrap(void) { PyDict_SetItemString(d, "CONTIGUOUS", PyInt_FromLong(CONTIGUOUS)); PyDict_SetItemString(d, "FORTRAN", PyInt_FromLong(FORTRAN)); PyDict_SetItemString(d, "OWNDATA", PyInt_FromLong(OWNDATA)); + PyDict_SetItemString(d, "FORCECAST", PyInt_FromLong(FORCECAST)); PyDict_SetItemString(d, "ENSURECOPY", PyInt_FromLong(ENSURECOPY)); PyDict_SetItemString(d, "ENSUREARRAY", PyInt_FromLong(ENSUREARRAY)); PyDict_SetItemString(d, "ALIGNED", PyInt_FromLong(ALIGNED)); - PyDict_SetItemString(d, "NOTSWAPPED", PyInt_FromLong(NOTSWAPPED)); PyDict_SetItemString(d, "WRITEABLE", PyInt_FromLong(WRITEABLE)); PyDict_SetItemString(d, "UPDATEIFCOPY", PyInt_FromLong(UPDATEIFCOPY)); PyDict_SetItemString(d, "BEHAVED_FLAGS", PyInt_FromLong(BEHAVED_FLAGS)); - PyDict_SetItemString(d, "BEHAVED_FLAGS_RO", PyInt_FromLong(BEHAVED_FLAGS_RO)); + PyDict_SetItemString(d, "BEHAVED_NS_FLAGS", PyInt_FromLong(BEHAVED_NS_FLAGS)); PyDict_SetItemString(d, "CARRAY_FLAGS", PyInt_FromLong(CARRAY_FLAGS)); PyDict_SetItemString(d, "FARRAY_FLAGS", PyInt_FromLong(FARRAY_FLAGS)); + PyDict_SetItemString(d, "CARRAY_FLAGS_RO", PyInt_FromLong(CARRAY_FLAGS_RO)); + PyDict_SetItemString(d, "FARRAY_FLAGS_RO", PyInt_FromLong(FARRAY_FLAGS_RO)); PyDict_SetItemString(d, "DEFAULT_FLAGS", PyInt_FromLong(DEFAULT_FLAGS)); PyDict_SetItemString(d, "UPDATE_ALL_FLAGS", PyInt_FromLong(UPDATE_ALL_FLAGS)); -- cgit v1.2.1