bpo-34201: Make ndarray.readonly a bool and use stricter tests in test_buffer. (GH-8414)

This commit is contained in:
Serhiy Storchaka 2018-07-26 13:23:03 +03:00 • committed by GitHub
parent 7cb7bcff20
commit e0d67f17cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 41 additions and 41 deletions

View file

@ -2038,7 +2038,7 @@ static PyObject *
ndarray_get_readonly(NDArrayObject *self, void *closure)
{
Py_buffer *base = &self->head->base;
return PyLong_FromLong(base->readonly);
return PyBool_FromLong(base->readonly);
}
static PyObject *