File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -230,16 +230,16 @@ STATIC void gc_sweep(void) {
230230 #endif
231231 // free unmarked heads and their tails
232232 int free_tail = 0 ;
233- for (mp_uint_t block = 0 ; block < MP_STATE_MEM (gc_alloc_table_byte_len ) * BLOCKS_PER_ATB ; block ++ ) {
233+ for (size_t block = 0 ; block < MP_STATE_MEM (gc_alloc_table_byte_len ) * BLOCKS_PER_ATB ; block ++ ) {
234234 switch (ATB_GET_KIND (block )) {
235235 case AT_HEAD :
236236#if MICROPY_ENABLE_FINALISER
237237 if (FTB_GET (block )) {
238- mp_obj_t obj = (mp_obj_t )PTR_FROM_BLOCK (block );
239- if ((( mp_obj_base_t * ) MP_OBJ_TO_PTR ( obj )) -> type != NULL ) {
238+ mp_obj_base_t * obj = (mp_obj_base_t * )PTR_FROM_BLOCK (block );
239+ if (obj -> type != NULL ) {
240240 // if the object has a type then see if it has a __del__ method
241241 mp_obj_t dest [2 ];
242- mp_load_method_maybe (obj , MP_QSTR___del__ , dest );
242+ mp_load_method_maybe (MP_OBJ_FROM_PTR ( obj ) , MP_QSTR___del__ , dest );
243243 if (dest [0 ] != MP_OBJ_NULL ) {
244244 // load_method returned a method
245245 mp_call_method_n_kw (0 , 0 , dest );
You can’t perform that action at this time.
0 commit comments