From 98dfd7bd44044ba3d89d85f3a2e38d868bee3884 Mon Sep 17 00:00:00 2001 From: Mark Wiebe Date: Thu, 7 Jul 2011 11:20:08 -0500 Subject: BUG: core: Missed a use of NPY_WRITEABLE in Py3 code when cleaning API --- numpy/core/src/multiarray/arraytypes.c.src | 6 +++--- numpy/core/src/multiarray/getset.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'numpy') diff --git a/numpy/core/src/multiarray/arraytypes.c.src b/numpy/core/src/multiarray/arraytypes.c.src index f61936bdd..f8362b27f 100644 --- a/numpy/core/src/multiarray/arraytypes.c.src +++ b/numpy/core/src/multiarray/arraytypes.c.src @@ -627,9 +627,9 @@ VOID_getitem(char *ip, PyArrayObject *ap) strides[0] = 1; descr = PyArray_DescrNewFromType(PyArray_BYTE); u = PyArray_NewFromDescr(&PyArray_Type, descr, 1, dims, strides, - ip, - PyArray_ISWRITEABLE(ap) ? NPY_WRITEABLE : 0, - NULL); + ip, + PyArray_ISWRITEABLE(ap) ? NPY_ARRAY_WRITEABLE : 0, + NULL); ((PyArrayObject*)u)->base = ap; Py_INCREF(ap); } diff --git a/numpy/core/src/multiarray/getset.c b/numpy/core/src/multiarray/getset.c index 0759cddb8..cbb7ce6e9 100644 --- a/numpy/core/src/multiarray/getset.c +++ b/numpy/core/src/multiarray/getset.c @@ -281,7 +281,7 @@ static PyObject * array_data_get(PyArrayObject *self) { #if defined(NPY_PY3K) - return PyMemoryView_FromObject(self); + return PyMemoryView_FromObject((PyObject *)self); #else intp nbytes; if (!(PyArray_ISONESEGMENT(self))) { -- cgit v1.2.1