mirror of
https://github.com/python/cpython.git
synced 2025-12-23 09:19:18 +00:00
Issue #19437: Fix GetKeepedObjects() of ctypes, handle PyCData_GetContainer()
failure
This commit is contained in:
parent
7184366dab
commit
588544d186
1 changed files with 5 additions and 1 deletions
|
|
@ -2344,7 +2344,11 @@ PyCData_GetContainer(CDataObject *self)
|
|||
static PyObject *
|
||||
GetKeepedObjects(CDataObject *target)
|
||||
{
|
||||
return PyCData_GetContainer(target)->b_objects;
|
||||
CDataObject *container;
|
||||
container = PyCData_GetContainer(target);
|
||||
if (container == NULL)
|
||||
return NULL;
|
||||
return container->b_objects;
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue