]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-128715: Expose ctypes.CField, with info attributes (GH-128950)
authorPetr Viktorin <encukou@gmail.com>
Mon, 24 Mar 2025 13:18:34 +0000 (14:18 +0100)
committerGitHub <noreply@github.com>
Mon, 24 Mar 2025 13:18:34 +0000 (14:18 +0100)
commit0e53038ea825765136c5275e09f9ea9be5982b82
treee78aefe8cb2462ecc1a5941b885446c306c25b7b
parent62fb15d8666f26883add93ae00cfff22ca95de2e
gh-128715: Expose ctypes.CField, with info attributes (GH-128950)

- Restore max field size to sys.maxsize, as in Python 3.13 & below
- PyCField: Split out bit/byte sizes/offsets.
- Expose CField's size/offset data to Python code
- Add generic checks for all the test structs/unions, using the newly exposed attrs
27 files changed:
Doc/library/ctypes.rst
Doc/whatsnew/3.14.rst
Include/internal/pycore_global_objects_fini_generated.h
Include/internal/pycore_global_strings.h
Include/internal/pycore_runtime_init_generated.h
Include/internal/pycore_unicodeobject_generated.h
Lib/ctypes/__init__.py
Lib/ctypes/_layout.py
Lib/test/test_ctypes/_support.py
Lib/test/test_ctypes/test_aligned_structures.py
Lib/test/test_ctypes/test_anon.py
Lib/test/test_ctypes/test_bitfields.py
Lib/test/test_ctypes/test_bytes.py
Lib/test/test_ctypes/test_byteswap.py
Lib/test/test_ctypes/test_funcptr.py
Lib/test/test_ctypes/test_generated_structs.py
Lib/test/test_ctypes/test_struct_fields.py
Lib/test/test_ctypes/test_structunion.py
Lib/test/test_ctypes/test_structures.py
Misc/NEWS.d/next/Library/2025-01-17-17-35-16.gh-issue-128715.tQjo89.rst [new file with mode: 0644]
Modules/_ctypes/_ctypes_test_generated.c.h
Modules/_ctypes/callbacks.c
Modules/_ctypes/callproc.c
Modules/_ctypes/cfield.c
Modules/_ctypes/clinic/cfield.c.h
Modules/_ctypes/ctypes.h
Modules/_ctypes/stgdict.c