Skip to content

Commit 37f4b63

Browse files
Update Modules/_ctypes/_ctypes.c
Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
1 parent e2a0064 commit 37f4b63

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Modules/_ctypes/_ctypes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2291,7 +2291,7 @@ static PyObject *CreateSwappedType(ctypes_state *st, PyTypeObject *type,
22912291
}
22922292
if (set_stginfo_ffi_type_pointer(stginfo, fmt)) {
22932293
Py_DECREF(result);
2294-
return PyErr_NoMemory();
2294+
return NULL;
22952295
}
22962296
stginfo->align = fmt->pffi_type->alignment;
22972297
stginfo->length = 0;

0 commit comments

Comments
 (0)