Skip to content

Commit 71fec07

Browse files
committed
py/vm: Use MP_OBJ_FROM_PTR to cast a type to an object.
1 parent 38b54b6 commit 71fec07

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

py/vm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ run_code_state: ;
626626
// stack: (..., __exit__, ctx_mgr, exc_instance)
627627
// Need to pass (exc_type, exc_instance, None) as arguments to __exit__.
628628
sp[1] = sp[0];
629-
sp[0] = mp_obj_get_type(sp[0]);
629+
sp[0] = MP_OBJ_FROM_PTR(mp_obj_get_type(sp[0]));
630630
sp[2] = mp_const_none;
631631
sp -= 2;
632632
mp_obj_t ret_value = mp_call_method_n_kw(3, 0, sp);

0 commit comments

Comments
 (0)