@@ -3606,23 +3606,23 @@ _PyErr_NoMemory(PyThreadState *tstate)
3606
3606
}
3607
3607
3608
3608
static void
3609
- MemoryError_dealloc (PyObject * obj )
3609
+ MemoryError_dealloc (PyObject * op )
3610
3610
{
3611
- PyBaseExceptionObject * self = ( PyBaseExceptionObject * ) obj ;
3611
+ PyBaseExceptionObject * self = _PyBaseExceptionObject_CAST ( op ) ;
3612
3612
_PyObject_GC_UNTRACK (self );
3613
3613
3614
- BaseException_clear (self );
3614
+ ( void ) BaseException_clear (op );
3615
3615
3616
3616
/* If this is a subclass of MemoryError, we don't need to
3617
3617
* do anything in the free-list*/
3618
3618
if (!Py_IS_TYPE (self , (PyTypeObject * ) PyExc_MemoryError )) {
3619
- Py_TYPE (self )-> tp_free (( PyObject * ) self );
3619
+ Py_TYPE (self )-> tp_free (op );
3620
3620
return ;
3621
3621
}
3622
3622
3623
3623
struct _Py_exc_state * state = get_exc_state ();
3624
3624
if (state -> memerrors_numfree >= MEMERRORS_SAVE ) {
3625
- Py_TYPE (self )-> tp_free (( PyObject * ) self );
3625
+ Py_TYPE (self )-> tp_free (op );
3626
3626
}
3627
3627
else {
3628
3628
self -> dict = (PyObject * ) state -> memerrors_freelist ;
@@ -3658,7 +3658,7 @@ free_preallocated_memerrors(struct _Py_exc_state *state)
3658
3658
while (state -> memerrors_freelist != NULL ) {
3659
3659
PyObject * self = (PyObject * ) state -> memerrors_freelist ;
3660
3660
state -> memerrors_freelist = (PyBaseExceptionObject * )state -> memerrors_freelist -> dict ;
3661
- Py_TYPE (self )-> tp_free (( PyObject * ) self );
3661
+ Py_TYPE (self )-> tp_free (self );
3662
3662
}
3663
3663
}
3664
3664
@@ -3670,10 +3670,10 @@ PyTypeObject _PyExc_MemoryError = {
3670
3670
0 , MemoryError_dealloc , 0 , 0 , 0 , 0 , 0 , 0 , 0 ,
3671
3671
0 , 0 , 0 , 0 , 0 , 0 , 0 ,
3672
3672
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC ,
3673
- PyDoc_STR ("Out of memory." ), ( traverseproc ) BaseException_traverse ,
3674
- ( inquiry ) BaseException_clear , 0 , 0 , 0 , 0 , 0 , 0 , 0 , & _PyExc_Exception ,
3673
+ PyDoc_STR ("Out of memory." ), BaseException_traverse ,
3674
+ BaseException_clear , 0 , 0 , 0 , 0 , 0 , 0 , 0 , & _PyExc_Exception ,
3675
3675
0 , 0 , 0 , offsetof(PyBaseExceptionObject , dict ),
3676
- ( initproc ) BaseException_init , 0 , MemoryError_new
3676
+ BaseException_init , 0 , MemoryError_new
3677
3677
};
3678
3678
PyObject * PyExc_MemoryError = (PyObject * ) & _PyExc_MemoryError ;
3679
3679
0 commit comments