Skip to content

Commit

Permalink
PINT: Switch to mp_obj_malloc_with_finaliser.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gadgetoid committed Jun 5, 2024
1 parent 95388e6 commit 2dd7dca
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions micropython/modules/pint/pint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ mp_obj_t network_pint_make_new(const mp_obj_type_t *type, size_t n_args, size_t
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);

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

mp_obj_t impl = args[ARG_impl].u_obj;

Expand Down

0 comments on commit 2dd7dca

Please sign in to comment.