diff options
author | Jim Mussared <jim.mussared@gmail.com> | 2022-04-22 13:05:56 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2022-09-19 19:06:04 +1000 |
commit | e8355eb16357b0bd234a9bcab1c9e8b72fcdbabc (patch) | |
tree | 894b411f743d6d285f0ed34c6685e9a33818b1cf /extmod/modframebuf.c | |
parent | 5ddf671944465411f90bd0968550b719d0dbdb80 (diff) | |
download | micropython-e8355eb16357b0bd234a9bcab1c9e8b72fcdbabc.tar.gz micropython-e8355eb16357b0bd234a9bcab1c9e8b72fcdbabc.zip |
py/obj: Add "full" and "empty" non-variable-length mp_obj_type_t.
This will always have the maximum/minimum size of a mp_obj_type_t
representation and can be used as a member in other structs.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'extmod/modframebuf.c')
-rw-r--r-- | extmod/modframebuf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extmod/modframebuf.c b/extmod/modframebuf.c index f29eab272f..5347be5643 100644 --- a/extmod/modframebuf.c +++ b/extmod/modframebuf.c @@ -841,7 +841,7 @@ STATIC MP_DEFINE_CONST_OBJ_TYPE( // this factory function is provided for backwards compatibility with old FrameBuffer1 class STATIC mp_obj_t legacy_framebuffer1(size_t n_args, const mp_obj_t *args_in) { - mp_obj_framebuf_t *o = mp_obj_malloc(mp_obj_framebuf_t, &mp_type_framebuf); + mp_obj_framebuf_t *o = mp_obj_malloc(mp_obj_framebuf_t, (mp_obj_type_t *)&mp_type_framebuf); mp_buffer_info_t bufinfo; mp_get_buffer_raise(args_in[0], &bufinfo, MP_BUFFER_WRITE); |