all: Make all mp_obj_type_t defs use MP_DEFINE_CONST_OBJ_TYPE.
In preparation for upcoming rework of mp_obj_type_t layout. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
committed by
Damien George
parent
cdb880789f
commit
662b9761b3
@@ -530,13 +530,14 @@ STATIC const mp_stream_p_t uart_stream_p = {
|
||||
.is_text = false,
|
||||
};
|
||||
|
||||
const mp_obj_type_t machine_uart_type = {
|
||||
{ &mp_type_type },
|
||||
.name = MP_QSTR_UART,
|
||||
.print = machine_uart_print,
|
||||
.make_new = machine_uart_make_new,
|
||||
.getiter = mp_identity_getiter,
|
||||
.iternext = mp_stream_unbuffered_iter,
|
||||
.protocol = &uart_stream_p,
|
||||
.locals_dict = (mp_obj_dict_t *)&machine_uart_locals_dict,
|
||||
};
|
||||
MP_DEFINE_CONST_OBJ_TYPE(
|
||||
machine_uart_type,
|
||||
MP_QSTR_UART,
|
||||
MP_TYPE_FLAG_NONE,
|
||||
machine_uart_make_new,
|
||||
print, machine_uart_print,
|
||||
getiter, mp_identity_getiter,
|
||||
iternext, mp_stream_unbuffered_iter,
|
||||
protocol, &uart_stream_p,
|
||||
locals_dict, (mp_obj_dict_t *)&machine_uart_locals_dict
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user