From 922b7c313197a28aa8243710d2d26f1034575674 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sun, 25 Mar 2018 14:25:04 -0500 Subject: 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: #705 --- py/gc_long_lived.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/py/gc_long_lived.c b/py/gc_long_lived.c index c50bbcd83..d34fde5d9 100644 --- a/py/gc_long_lived.c +++ b/py/gc_long_lived.c @@ -78,9 +78,9 @@ mp_obj_property_t *make_property_long_lived(mp_obj_property_t *prop, uint8_t max if (max_depth == 0) { return prop; } - prop->proxy[0] = make_fun_bc_long_lived((mp_obj_fun_bc_t*) prop->proxy[0], max_depth - 1); - prop->proxy[1] = make_fun_bc_long_lived((mp_obj_fun_bc_t*) prop->proxy[1], max_depth - 1); - prop->proxy[2] = make_fun_bc_long_lived((mp_obj_fun_bc_t*) prop->proxy[2], max_depth - 1); + prop->proxy[0] = make_obj_long_lived((mp_obj_fun_bc_t*) prop->proxy[0], max_depth - 1); + prop->proxy[1] = make_obj_long_lived((mp_obj_fun_bc_t*) prop->proxy[1], max_depth - 1); + prop->proxy[2] = make_obj_long_lived((mp_obj_fun_bc_t*) prop->proxy[2], max_depth - 1); return gc_make_long_lived(prop); } -- cgit v1.2.3