@@ -240,16 +240,16 @@ STATIC void ringbuf_get_uuid(ringbuf_t *ringbuf, mp_obj_bluetooth_uuid_t *uuid)
240240
241241#endif // !MICROPY_PY_BLUETOOTH_USE_SYNC_EVENTS
242242
243- const mp_obj_type_t mp_type_bluetooth_uuid = {
244- { & mp_type_type } ,
245- . name = MP_QSTR_UUID ,
246- . make_new = bluetooth_uuid_make_new ,
247- . unary_op = bluetooth_uuid_unary_op ,
248- . binary_op = bluetooth_uuid_binary_op ,
249- . locals_dict = NULL ,
250- . print = bluetooth_uuid_print ,
251- . buffer = bluetooth_uuid_get_buffer ,
252- } ;
243+ MP_DEFINE_CONST_OBJ_TYPE (
244+ mp_type_bluetooth_uuid ,
245+ MP_QSTR_UUID ,
246+ MP_TYPE_FLAG_NONE ,
247+ bluetooth_uuid_make_new ,
248+ unary_op , bluetooth_uuid_unary_op ,
249+ binary_op , bluetooth_uuid_binary_op ,
250+ print , bluetooth_uuid_print ,
251+ buffer , bluetooth_uuid_get_buffer
252+ ) ;
253253
254254// ----------------------------------------------------------------------------
255255// Bluetooth object: General
@@ -976,12 +976,13 @@ STATIC const mp_rom_map_elem_t bluetooth_ble_locals_dict_table[] = {
976976};
977977STATIC MP_DEFINE_CONST_DICT (bluetooth_ble_locals_dict , bluetooth_ble_locals_dict_table );
978978
979- STATIC const mp_obj_type_t mp_type_bluetooth_ble = {
980- { & mp_type_type },
981- .name = MP_QSTR_BLE ,
982- .make_new = bluetooth_ble_make_new ,
983- .locals_dict = (void * )& bluetooth_ble_locals_dict ,
984- };
979+ STATIC MP_DEFINE_CONST_OBJ_TYPE (
980+ mp_type_bluetooth_ble ,
981+ MP_QSTR_BLE ,
982+ MP_TYPE_FLAG_NONE ,
983+ bluetooth_ble_make_new ,
984+ locals_dict , (void * )& bluetooth_ble_locals_dict
985+ );
985986
986987STATIC const mp_rom_map_elem_t mp_module_bluetooth_globals_table [] = {
987988 { MP_ROM_QSTR (MP_QSTR___name__ ), MP_ROM_QSTR (MP_QSTR_ubluetooth ) },
0 commit comments