Fix DotClockFrameBuffer type definition

also remove unnecessary `const` with `MP_DEFINE_CONST_TYPE_OBJ` in I2C
This commit is contained in:
Dan Halbert 2023-10-13 12:11:14 -04:00
parent 2f391e5679
commit 021926c96a
2 changed files with 10 additions and 12 deletions

View File

@ -388,7 +388,7 @@ STATIC const mp_rom_map_elem_t busio_i2c_locals_dict_table[] = {
STATIC MP_DEFINE_CONST_DICT(busio_i2c_locals_dict, busio_i2c_locals_dict_table);
const MP_DEFINE_CONST_OBJ_TYPE(
MP_DEFINE_CONST_OBJ_TYPE(
busio_i2c_type,
MP_QSTR_I2C,
MP_TYPE_FLAG_NONE,

View File

@ -382,14 +382,12 @@ STATIC const mp_rom_map_elem_t dotclockframebuffer_framebuffer_locals_dict_table
};
STATIC MP_DEFINE_CONST_DICT(dotclockframebuffer_framebuffer_locals_dict, dotclockframebuffer_framebuffer_locals_dict_table);
const mp_obj_type_t dotclockframebuffer_framebuffer_type = {
{ &mp_type_type },
.flags = MP_TYPE_FLAG_EXTENDED,
.name = MP_QSTR_DotClockFramebuffer,
.make_new = dotclockframebuffer_framebuffer_make_new,
.locals_dict = (mp_obj_dict_t *)&dotclockframebuffer_framebuffer_locals_dict,
MP_TYPE_EXTENDED_FIELDS(
.buffer_p = { .get_buffer = dotclockframebuffer_framebuffer_get_buffer, },
.protocol = &dotclockframebuffer_framebuffer_proto,
),
};
MP_DEFINE_CONST_OBJ_TYPE(
dotclockframebuffer_framebuffer_type,
MP_QSTR_DotClockFramebuffer,
MP_TYPE_FLAG_NONE,
make_new, dotclockframebuffer_framebuffer_make_new,
locals_dict, &dotclockframebuffer_framebuffer_locals_dict,
buffer, dotclockframebuffer_framebuffer_get_buffer,
protocol, &dotclockframebuffer_framebuffer_proto
);