all: Use mp_obj_malloc_with_finaliser everywhere it's applicable.

Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
Damien George
2024-02-16 11:02:58 +11:00
parent 4133c03040
commit cae690d047
19 changed files with 30 additions and 55 deletions

View File

@@ -87,9 +87,7 @@ static void ppp_status_cb(ppp_pcb *pcb, int err_code, void *ctx) {
STATIC mp_obj_t ppp_make_new(mp_obj_t stream) {
mp_get_stream_raise(stream, MP_STREAM_OP_READ | MP_STREAM_OP_WRITE);
ppp_if_obj_t *self = m_new_obj_with_finaliser(ppp_if_obj_t);
self->base.type = &ppp_if_type;
ppp_if_obj_t *self = mp_obj_malloc_with_finaliser(ppp_if_obj_t, &ppp_if_type);
self->stream = stream;
self->active = false;
self->connected = false;