]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-61103: Support float and long double complex types in ctypes module (#121248)
authorSergey B Kirpichev <skirpichev@gmail.com>
Wed, 3 Jul 2024 09:08:11 +0000 (12:08 +0300)
committerGitHub <noreply@github.com>
Wed, 3 Jul 2024 09:08:11 +0000 (11:08 +0200)
commit51c4a324c037fb2e31640202243fd1c8b33800d5
tree08621c55e9f848fc08e22852fb54e0ccc1d16d97
parentc9bdfbe86853fcf5f2b7dce3a50b383e23384ed2
gh-61103: Support float and long double complex types in ctypes module (#121248)

This amends 6988ff02a5: memory allocation for
stginfo->ffi_type_pointer.elements in PyCSimpleType_init() should be
more generic (perhaps someday fmt->pffi_type->elements will be not a
two-elements array).

It should finally resolve #61103.

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Doc/library/ctypes.rst
Lib/ctypes/__init__.py
Lib/test/test_ctypes/test_libc.py
Lib/test/test_ctypes/test_numbers.py
Misc/NEWS.d/next/Library/2024-06-23-07-23-08.gh-issue-61103.ca_U_l.rst
Modules/_complex.h
Modules/_ctypes/_ctypes.c
Modules/_ctypes/_ctypes_test.c
Modules/_ctypes/callproc.c
Modules/_ctypes/cfield.c
Modules/_ctypes/ctypes.h