cpython/Lib/ctypes
Gregory P. Smith fa7c37af49
[3.11] gh-99952: fix refcount issues in ctypes.Structure from_param() result (#101339)
[3.11] gh-99952: [ctypes] fix refcount issues in from_param() result. (GH-100169)

Fixes a reference counting issue with `ctypes.Structure` when a `from_param()` method call is used and the structure size is larger than a C pointer `sizeof(void*)`.

This problem existed for a very long time, but became more apparent in 3.8+ by change likely due to garbage collection cleanup timing changes..
(cherry picked from commit dfad678d70)

Co-authored-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
2023-01-26 01:02:37 -08:00
..
macholib gh-91265: Make old ctypes.macholib tests runned by `python -m test` (gh-32094) 2022-04-18 09:27:09 +02:00
test [3.11] gh-99952: fix refcount issues in ctypes.Structure from_param() result (#101339) 2023-01-26 01:02:37 -08:00
__init__.py bpo-33178: Add BigEndianUnion, LittleEndianUnion classes to ctypes (GH-25480) 2022-03-29 14:26:27 -07:00
_aix.py Fix typos in the Lib directory (GH-28775) 2021-10-06 16:13:48 -07:00
_endian.py bpo-33178: Add BigEndianUnion, LittleEndianUnion classes to ctypes (GH-25480) 2022-03-29 14:26:27 -07:00
util.py bpo-41976: Fix the fallback to gcc of ctypes.util.find_library when using gcc>9 (GH-22598) 2020-10-08 19:31:19 +01:00
wintypes.py Issue #3612: Added new types to ctypes.wintypes. (CHAR and pointers) 2010-09-28 21:08:38 +00:00