mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #19437: Fix PyCData_GetContainer() of ctypes, handle PyDict_New() failure
This commit is contained in:
parent
22af2599a9
commit
7184366dab
1 changed files with 2 additions and 0 deletions
|
@ -2331,6 +2331,8 @@ PyCData_GetContainer(CDataObject *self)
|
|||
if (self->b_objects == NULL) {
|
||||
if (self->b_length) {
|
||||
self->b_objects = PyDict_New();
|
||||
if (self->b_objects == NULL)
|
||||
return NULL;
|
||||
} else {
|
||||
Py_INCREF(Py_None);
|
||||
self->b_objects = Py_None;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue