cpython/Modules/_ctypes
Miss Islington (bot) b134978467
[3.10] [3.11] gh-99952: fix refcount issues in ctypes.Structure from_param() result (GH-101339) (#101340)
[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)

(cherry picked from commit fa7c37af49)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2023-02-04 12:09:29 -08:00
..
darwin Recorded merge of revisions 81032 via svnmerge from 2010-05-09 16:14:21 +00:00
libffi_osx Fix typos in comments, docs and test names (#15018) 2019-07-30 18:16:13 -04:00
_ctypes.c [3.10] [3.11] gh-99952: fix refcount issues in ctypes.Structure from_param() result (GH-101339) (#101340) 2023-02-04 12:09:29 -08:00
_ctypes_test.c [3.10] [3.11] gh-99952: fix refcount issues in ctypes.Structure from_param() result (GH-101339) (#101340) 2023-02-04 12:09:29 -08:00
_ctypes_test.h
callbacks.c GH-81061: Fix refcount issue when returning None from a ctypes.py_object callback (GH-13364) 2023-01-09 07:54:00 -08:00
callproc.c [3.10] gh-92119: ctypes: Print exception class name instead of its representation (GH-98302) (#99452) 2022-11-13 15:55:58 -08:00
cfield.c [3.10] gh-91118: Fix docstrings that do not honor --without-doc-strings (GH-31769) (#91662) 2022-04-19 13:01:09 -07:00
ctypes.h [3.10] Fix typos in the Modules directory (GH-28761) (GH-28781) 2021-10-07 01:55:18 -07:00
ctypes_dlfcn.h Remove outdated PEP 291 compatibility requirement comment 2016-05-14 05:55:38 +00:00
malloc_closure.c bpo-42688: Fix ffi alloc/free when using external libffi on macos (GH-23868) 2020-12-22 03:12:07 -08:00
stgdict.c gh-99275: Fix SystemError in ctypes during __initsubclass__ (GH-99283) 2022-11-13 11:40:18 -08:00