mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
bpo-34201: Make ndarray.readonly a bool and use stricter tests in test_buffer. (GH-8414)
This commit is contained in:
parent
7cb7bcff20
commit
e0d67f17cc
2 changed files with 41 additions and 41 deletions
|
|
@ -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 *
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue