File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4967,15 +4967,9 @@ symtable_update_free_vars(struct symtable *st)
49674967 for (i = 0 ; i < PyList_GET_SIZE (ste -> ste_children ); ++ i ) {
49684968 int pos = 0 ;
49694969
4970- if (list )
4971- if (PyList_SetSlice (list , 0 ,
4972- ((PyVarObject * )list )-> ob_size , 0 ) < 0 )
4970+ if (list && PyList_SetSlice (list , 0 ,
4971+ PyList_GET_SIZE (list ), 0 ) < 0 )
49734972 return -1 ;
4974- /* Yes, the above call CAN fail, even though it's reducing
4975- the size of the list. The current implementation will
4976- allocate temp memory equal to the size of the list: this
4977- is avoidable in this specific case, but probably not
4978- worth the effort of special-casing it. - JRH */
49794973 child = (PySymtableEntryObject * )
49804974 PyList_GET_ITEM (ste -> ste_children , i );
49814975 while (PyDict_Next (child -> ste_symbols , & pos , & name , & o )) {
You can’t perform that action at this time.
0 commit comments