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
@@ -1016,20 +1016,24 @@ STATIC const mp_rom_map_elem_t wiznet5k_locals_dict_table[] = {
|
||||
STATIC MP_DEFINE_CONST_DICT(wiznet5k_locals_dict, wiznet5k_locals_dict_table);
|
||||
|
||||
#if WIZNET5K_WITH_LWIP_STACK
|
||||
const mp_obj_type_t mod_network_nic_type_wiznet5k = {
|
||||
{ &mp_type_type },
|
||||
.name = MP_QSTR_WIZNET5K,
|
||||
.make_new = wiznet5k_make_new,
|
||||
.locals_dict = (mp_obj_dict_t *)&wiznet5k_locals_dict,
|
||||
};
|
||||
MP_DEFINE_CONST_OBJ_TYPE(
|
||||
mod_network_nic_type_wiznet5k,
|
||||
MP_QSTR_WIZNET5K,
|
||||
MP_TYPE_FLAG_NONE,
|
||||
wiznet5k_make_new,
|
||||
locals_dict, &wiznet5k_locals_dict
|
||||
);
|
||||
#else // WIZNET5K_PROVIDED_STACK
|
||||
STATIC MP_DEFINE_CONST_OBJ_TYPE(
|
||||
mod_network_nic_type_wiznet5k_base,
|
||||
MP_QSTR_WIZNET5K,
|
||||
MP_TYPE_FLAG_NONE,
|
||||
wiznet5k_make_new,
|
||||
locals_dict, &wiznet5k_locals_dict
|
||||
);
|
||||
|
||||
const mod_network_nic_type_t mod_network_nic_type_wiznet5k = {
|
||||
.base = {
|
||||
{ &mp_type_type },
|
||||
.name = MP_QSTR_WIZNET5K,
|
||||
.make_new = wiznet5k_make_new,
|
||||
.locals_dict = (mp_obj_dict_t *)&wiznet5k_locals_dict,
|
||||
},
|
||||
.base = mod_network_nic_type_wiznet5k_base,
|
||||
.gethostbyname = wiznet5k_gethostbyname,
|
||||
.socket = wiznet5k_socket_socket,
|
||||
.close = wiznet5k_socket_close,
|
||||
|
||||
Reference in New Issue
Block a user