File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -430,7 +430,7 @@ buffered_dealloc(PyObject *op)
430430        self -> lock  =  NULL ;
431431    }
432432    (void )buffered_clear (op );
433-     tp -> tp_free (op );
433+     tp -> tp_free (self );
434434    Py_DECREF (tp );
435435}
436436
Original file line number Diff line number Diff line change @@ -895,7 +895,7 @@ bytesio_dealloc(PyObject *op)
895895{
896896    bytesio  * self  =  _bytesio_CAST (op );
897897    PyTypeObject  * tp  =  Py_TYPE (self );
898-     _PyObject_GC_UNTRACK (op );
898+     _PyObject_GC_UNTRACK (self );
899899    if  (self -> exports  >  0 ) {
900900        PyErr_SetString (PyExc_SystemError ,
901901                        "deallocated BytesIO object has exported buffers" );
Original file line number Diff line number Diff line change @@ -362,15 +362,15 @@ iobase_clear(PyObject *op)
362362/* Destructor */ 
363363
364364static  void 
365- iobase_dealloc (PyObject  * self )
365+ iobase_dealloc (PyObject  * op )
366366{
367367    /* NOTE: since IOBaseObject has its own dict, Python-defined attributes 
368368       are still available here for close() to use. 
369369       However, if the derived class declares a __slots__, those slots are 
370370       already gone. 
371371    */ 
372-     iobase  * base  =  _iobase_CAST (self );
373-     if  (_PyIOBase_finalize (self ) <  0 ) {
372+     iobase  * self  =  _iobase_CAST (op );
373+     if  (_PyIOBase_finalize (op ) <  0 ) {
374374        /* When called from a heap type's dealloc, the type will be 
375375           decref'ed on return (see e.g. subtype_dealloc in typeobject.c). */ 
376376        if  (_PyType_HasFeature (Py_TYPE (self ), Py_TPFLAGS_HEAPTYPE )) {
@@ -380,9 +380,9 @@ iobase_dealloc(PyObject *self)
380380    }
381381    PyTypeObject  * tp  =  Py_TYPE (self );
382382    _PyObject_GC_UNTRACK (self );
383-     if  (base -> weakreflist  !=  NULL )
384-         PyObject_ClearWeakRefs (self );
385-     Py_CLEAR (base -> dict );
383+     if  (self -> weakreflist  !=  NULL )
384+         PyObject_ClearWeakRefs (op );
385+     Py_CLEAR (self -> dict );
386386    tp -> tp_free (self );
387387    Py_DECREF (tp );
388388}
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments