bpo-41654: Explicitly cast PyExc_MemoryError to PyTypeObject to avoid warning (GH-22102)
This commit is contained in:
parent
4ddb2d73ac
commit
6ae61959ec
|
@ -2295,8 +2295,9 @@ MemoryError_dealloc(PyBaseExceptionObject *self)
|
||||||
{
|
{
|
||||||
BaseException_clear(self);
|
BaseException_clear(self);
|
||||||
|
|
||||||
if (Py_TYPE(self) != PyExc_MemoryError) {
|
if (Py_TYPE(self) != (PyTypeObject *)PyExc_MemoryError) {
|
||||||
return Py_TYPE(self)->tp_free((PyObject *)self);
|
Py_TYPE(self)->tp_free((PyObject *)self);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_PyObject_GC_UNTRACK(self);
|
_PyObject_GC_UNTRACK(self);
|
||||||
|
|
Loading…
Reference in New Issue