Skip to content

Commit 2dd7dca

Browse files
committed
PINT: Switch to mp_obj_malloc_with_finaliser.
1 parent 95388e6 commit 2dd7dca

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

micropython/modules/pint/pint.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ mp_obj_t network_pint_make_new(const mp_obj_type_t *type, size_t n_args, size_t
8080
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
8181
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
8282

83-
nic = m_new_obj_with_finaliser(_pint_obj_t);
84-
nic->base.type = &mod_network_nic_type_pint;
83+
nic = mp_obj_malloc_with_finaliser(_pint_obj_t, &mod_network_nic_type_pint);
8584

8685
mp_obj_t impl = args[ARG_impl].u_obj;
8786

0 commit comments

Comments
 (0)