Skip to content

Commit 021926c

Browse files
committed
Fix DotClockFrameBuffer type definition
also remove unnecessary `const` with `MP_DEFINE_CONST_TYPE_OBJ` in I2C
1 parent 2f391e5 commit 021926c

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

shared-bindings/busio/I2C.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ STATIC const mp_rom_map_elem_t busio_i2c_locals_dict_table[] = {
388388

389389
STATIC MP_DEFINE_CONST_DICT(busio_i2c_locals_dict, busio_i2c_locals_dict_table);
390390

391-
const MP_DEFINE_CONST_OBJ_TYPE(
391+
MP_DEFINE_CONST_OBJ_TYPE(
392392
busio_i2c_type,
393393
MP_QSTR_I2C,
394394
MP_TYPE_FLAG_NONE,

shared-bindings/dotclockframebuffer/DotClockFramebuffer.c

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -382,14 +382,12 @@ STATIC const mp_rom_map_elem_t dotclockframebuffer_framebuffer_locals_dict_table
382382
};
383383
STATIC MP_DEFINE_CONST_DICT(dotclockframebuffer_framebuffer_locals_dict, dotclockframebuffer_framebuffer_locals_dict_table);
384384

385-
const mp_obj_type_t dotclockframebuffer_framebuffer_type = {
386-
{ &mp_type_type },
387-
.flags = MP_TYPE_FLAG_EXTENDED,
388-
.name = MP_QSTR_DotClockFramebuffer,
389-
.make_new = dotclockframebuffer_framebuffer_make_new,
390-
.locals_dict = (mp_obj_dict_t *)&dotclockframebuffer_framebuffer_locals_dict,
391-
MP_TYPE_EXTENDED_FIELDS(
392-
.buffer_p = { .get_buffer = dotclockframebuffer_framebuffer_get_buffer, },
393-
.protocol = &dotclockframebuffer_framebuffer_proto,
394-
),
395-
};
385+
MP_DEFINE_CONST_OBJ_TYPE(
386+
dotclockframebuffer_framebuffer_type,
387+
MP_QSTR_DotClockFramebuffer,
388+
MP_TYPE_FLAG_NONE,
389+
make_new, dotclockframebuffer_framebuffer_make_new,
390+
locals_dict, &dotclockframebuffer_framebuffer_locals_dict,
391+
buffer, dotclockframebuffer_framebuffer_get_buffer,
392+
protocol, &dotclockframebuffer_framebuffer_proto
393+
);

0 commit comments

Comments
 (0)