File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ get_array_state(PyObject *module)
8080    (get_array_state(PyType_GetModule(cls)))
8181
8282#define  arrayobject_CAST (op )        ((arrayobject *)(op))
83+ #define  arrayiterobject_CAST (op )    ((arrayiterobject *)(op))
8384
8485enum  machine_format_code  {
8586    UNKNOWN_FORMAT  =  -1 ,
@@ -3025,16 +3026,15 @@ array_iter(PyObject *op)
30253026}
30263027
30273028static  PyObject  * 
3028- arrayiter_next (arrayiterobject   * it )
3029+ arrayiter_next (PyObject   * op )
30293030{
3030-     arrayobject  * ao ;
3031- 
3031+     arrayiterobject  * it  =  arrayiterobject_CAST (op );
30323032    assert (it  !=  NULL );
30333033#ifndef  NDEBUG 
30343034    array_state  * state  =  find_array_state_by_type (Py_TYPE (it ));
30353035    assert (PyObject_TypeCheck (it , state -> ArrayIterType ));
30363036#endif 
3037-     ao  =  it -> ao ;
3037+     arrayobject   * ao  =  it -> ao ;
30383038    if  (ao  ==  NULL ) {
30393039        return  NULL ;
30403040    }
@@ -3050,19 +3050,20 @@ arrayiter_next(arrayiterobject *it)
30503050}
30513051
30523052static  void 
3053- arrayiter_dealloc (arrayiterobject   * it )
3053+ arrayiter_dealloc (PyObject   * op )
30543054{
3055+     arrayiterobject  * it  =  arrayiterobject_CAST (op );
30553056    PyTypeObject  * tp  =  Py_TYPE (it );
3056- 
30573057    PyObject_GC_UnTrack (it );
30583058    Py_XDECREF (it -> ao );
30593059    PyObject_GC_Del (it );
30603060    Py_DECREF (tp );
30613061}
30623062
30633063static  int 
3064- arrayiter_traverse (arrayiterobject   * it , visitproc  visit , void  * arg )
3064+ arrayiter_traverse (PyObject   * op , visitproc  visit , void  * arg )
30653065{
3066+     arrayiterobject  * it  =  arrayiterobject_CAST (op );
30663067    Py_VISIT (Py_TYPE (it ));
30673068    Py_VISIT (it -> ao );
30683069    return  0 ;
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments