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
Make MemoryError_dealloc compatible with destructor
  • Loading branch information
picnixz committed Aug 14, 2024
commit cc28b384da5be07ece194b8b3dce1072e6241a66
5 changes: 3 additions & 2 deletions Objects/exceptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -3387,8 +3387,9 @@ _PyErr_NoMemory(PyThreadState *tstate)
}

static void
MemoryError_dealloc(PyBaseExceptionObject *self)
MemoryError_dealloc(PyObject *obj)
{
PyBaseExceptionObject *self = (PyBaseExceptionObject *)obj;
_PyObject_GC_UNTRACK(self);

BaseException_clear(self);
Expand Down Expand Up @@ -3447,7 +3448,7 @@ PyTypeObject _PyExc_MemoryError = {
PyVarObject_HEAD_INIT(NULL, 0)
"MemoryError",
sizeof(PyBaseExceptionObject),
0, (destructor)MemoryError_dealloc, 0, 0, 0, 0, 0, 0, 0,
0, MemoryError_dealloc, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC,
PyDoc_STR("Out of memory."), (traverseproc)BaseException_traverse,
Expand Down