diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2020-09-05 16:07:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-05 16:07:54 (GMT) |
commit | 6ae61959ec51a6b3dddc8e665ce6a7b8aeb26c04 (patch) | |
tree | 79a1bbe377ebfbabf5a3e4fde248751dcc9e0959 /Objects | |
parent | 4ddb2d73ac661af516a252fe697ec05e726b0f20 (diff) | |
download | cpython-6ae61959ec51a6b3dddc8e665ce6a7b8aeb26c04.zip cpython-6ae61959ec51a6b3dddc8e665ce6a7b8aeb26c04.tar.gz cpython-6ae61959ec51a6b3dddc8e665ce6a7b8aeb26c04.tar.bz2 |
bpo-41654: Explicitly cast PyExc_MemoryError to PyTypeObject to avoid warning (GH-22102)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/exceptions.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c index 9669838..8bcf76f 100644 --- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -2295,8 +2295,9 @@ MemoryError_dealloc(PyBaseExceptionObject *self) { BaseException_clear(self); - if (Py_TYPE(self) != PyExc_MemoryError) { - return Py_TYPE(self)->tp_free((PyObject *)self); + if (Py_TYPE(self) != (PyTypeObject *)PyExc_MemoryError) { + Py_TYPE(self)->tp_free((PyObject *)self); + return; } _PyObject_GC_UNTRACK(self); |