commit | f6fe4bb75cb1c7423cfd08d0bf10f9843761c2ac | [log] [tgz] |
---|---|---|
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | Fri Dec 23 00:56:20 2022 -0800 |
committer | GitHub <noreply@github.com> | Fri Dec 23 08:56:20 2022 +0000 |
tree | 081dcfa2531dbe6e4941310e7c0d2cb1e7d2b485 | |
parent | 1fa4c6bd1f895df1ca6205a8bd3f60fdd287405c [diff] |
[3.11] gh-76963: PEP3118 itemsize of an empty ctypes array should not be 0 (GH-5576) (GH-100452) gh-76963: PEP3118 itemsize of an empty ctypes array should not be 0 (GH-5576) The itemsize returned in a memoryview of a ctypes array is now computed from the item type, instead of dividing the total size by the length and assuming that the length is not zero. (cherry picked from commit 84bc6a4f25fcf467813ee12b74118f7b1b54e285) Co-authored-by: Eric Wieser <wieser.eric@gmail.com>