diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2022-12-23 08:23:19 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-23 08:23:19 (GMT) |
commit | 84bc6a4f25fcf467813ee12b74118f7b1b54e285 (patch) | |
tree | d5ec734fae7968f0073f5769d3575b7173038096 /Misc | |
parent | 73c08eeaffadb73184808e462792b6793ce9f82d (diff) | |
download | cpython-84bc6a4f25fcf467813ee12b74118f7b1b54e285.zip cpython-84bc6a4f25fcf467813ee12b74118f7b1b54e285.tar.gz cpython-84bc6a4f25fcf467813ee12b74118f7b1b54e285.tar.bz2 |
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.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Core and Builtins/2018-02-06-23-21-13.bpo-32782.EJVSfR.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2018-02-06-23-21-13.bpo-32782.EJVSfR.rst b/Misc/NEWS.d/next/Core and Builtins/2018-02-06-23-21-13.bpo-32782.EJVSfR.rst new file mode 100644 index 0000000..8417401 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2018-02-06-23-21-13.bpo-32782.EJVSfR.rst @@ -0,0 +1,3 @@ +``ctypes`` arrays of length 0 now report a correct itemsize when a +``memoryview`` is constructed from them, rather than always giving a value +of 0. |