mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
[3.13] gh-126341: add release check to __iter__
method of memoryview
(GH-126759) (#126778)
gh-126341: add release check to `__iter__` method of `memoryview` (GH-126759)
(cherry picked from commit a12690ef49
)
Co-authored-by: Ritvik Pasham <ritvikpasham@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: sobolevn <mail@sobolevn.me>
This commit is contained in:
parent
1d6ba84ecb
commit
3fe062c98d
3 changed files with 4 additions and 0 deletions
|
@ -3355,6 +3355,7 @@ memory_iter(PyObject *seq)
|
|||
PyErr_BadInternalCall();
|
||||
return NULL;
|
||||
}
|
||||
CHECK_RELEASED(seq);
|
||||
PyMemoryViewObject *obj = (PyMemoryViewObject *)seq;
|
||||
int ndims = obj->view.ndim;
|
||||
if (ndims == 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue