]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-132417: ctypes: Fix potential `Py_DECREF(NULL)` when handling functions returning...
authorNicolas Trangez <ikke@nicolast.be>
Sat, 12 Apr 2025 07:40:34 +0000 (09:40 +0200)
committerGitHub <noreply@github.com>
Sat, 12 Apr 2025 07:40:34 +0000 (07:40 +0000)
commit2aab2db1461ef49b42549255af16a74b1bf8a5ef
tree89c09c83c227f883c8a23f1f349932a97c1f4e92
parente0dffc54b888a18ad22e83411c2b615cc94a1fdf
GH-132417: ctypes: Fix potential `Py_DECREF(NULL)` when handling functions returning `PyObject *` (#132418)

Some functions (such as `PyErr_Occurred`) with a `restype` set to `ctypes.py_object` may return NULL without setting an exception.
Lib/test/test_ctypes/test_refcounts.py
Misc/NEWS.d/next/Library/2025-04-11-21-48-49.gh-issue-132417.uILGdS.rst [new file with mode: 0644]
Modules/_ctypes/callproc.c