Skip to content

Commit 922b7c3

Browse files
committed
Don't assume the type of the prop->proxy objects
This fixes a crash running the cpydiff/core_class_superproperty.py test, but it does not fix the difference to cpython3. Closes: adafruit#705
1 parent fa88446 commit 922b7c3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

py/gc_long_lived.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ mp_obj_property_t *make_property_long_lived(mp_obj_property_t *prop, uint8_t max
7878
if (max_depth == 0) {
7979
return prop;
8080
}
81-
prop->proxy[0] = make_fun_bc_long_lived((mp_obj_fun_bc_t*) prop->proxy[0], max_depth - 1);
82-
prop->proxy[1] = make_fun_bc_long_lived((mp_obj_fun_bc_t*) prop->proxy[1], max_depth - 1);
83-
prop->proxy[2] = make_fun_bc_long_lived((mp_obj_fun_bc_t*) prop->proxy[2], max_depth - 1);
81+
prop->proxy[0] = make_obj_long_lived((mp_obj_fun_bc_t*) prop->proxy[0], max_depth - 1);
82+
prop->proxy[1] = make_obj_long_lived((mp_obj_fun_bc_t*) prop->proxy[1], max_depth - 1);
83+
prop->proxy[2] = make_obj_long_lived((mp_obj_fun_bc_t*) prop->proxy[2], max_depth - 1);
8484
return gc_make_long_lived(prop);
8585
}
8686

0 commit comments

Comments
 (0)