mirror of
https://github.com/python/cpython.git
synced 2025-10-31 21:51:50 +00:00
GH-132417: ctypes: Fix potential `Py_DECREF(NULL)` when handling functions returning `PyObject *` (GH-132418)
Some functions (such as `PyErr_Occurred`) with a `restype` set to `ctypes.py_object` may return NULL without setting an exception.
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| clinic | ||
| _ctypes.c | ||
| _ctypes_test.c | ||
| _ctypes_test.h | ||
| callbacks.c | ||
| callproc.c | ||
| cfield.c | ||
| ctypes.h | ||
| malloc_closure.c | ||
| stgdict.c | ||