File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -410,24 +410,27 @@ typedef struct {
410
410
Py_ssize_t allocated ; /* number of slots in data allocated */
411
411
} Pdata ;
412
412
413
+ #define _Pdata_CAST (op ) ((Pdata *)(op))
414
+
413
415
static int
414
- Pdata_traverse (Pdata * self , visitproc visit , void * arg )
416
+ Pdata_traverse (PyObject * self , visitproc visit , void * arg )
415
417
{
416
418
Py_VISIT (Py_TYPE (self ));
417
419
return 0 ;
418
420
}
419
421
420
422
static void
421
- Pdata_dealloc (Pdata * self )
423
+ Pdata_dealloc (PyObject * op )
422
424
{
425
+ Pdata * self = _Pdata_CAST (op );
423
426
PyTypeObject * tp = Py_TYPE (self );
424
427
PyObject_GC_UnTrack (self );
425
428
Py_ssize_t i = Py_SIZE (self );
426
429
while (-- i >= 0 ) {
427
430
Py_DECREF (self -> data [i ]);
428
431
}
429
432
PyMem_Free (self -> data );
430
- tp -> tp_free (( PyObject * ) self );
433
+ tp -> tp_free (self );
431
434
Py_DECREF (tp );
432
435
}
433
436
You can’t perform that action at this time.
0 commit comments