Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use PyType_GetSlot
  • Loading branch information
kumaraditya303 authored Jul 3, 2022
commit f23671cdd36f4b7da1e94dc1c472eb650540802c
5 changes: 4 additions & 1 deletion Modules/_struct.c
Original file line number Diff line number Diff line change
Expand Up @@ -1451,7 +1451,10 @@ static PyObject *
Struct_impl(PyTypeObject *type, PyObject *format)
/*[clinic end generated code: output=49468b044e334308 input=8b91868eb1df0e28]*/
{
PyStructObject *self = (PyStructObject *)type->tp_alloc(type, 0);
allocfunc alloc = PyType_GetSlot(type, Py_tp_alloc);
assert(alloc != NULL);
PyStructObject *self = (PyStructObject *)alloc(type, 0);

if (self == NULL) {
return NULL;
}
Expand Down