summaryrefslogtreecommitdiff
path: root/extmod/modframebuf.c
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2024-03-25 13:12:08 +1100
committerDamien George <damien@micropython.org>2024-03-28 16:18:09 +1100
commit8b0efde927afb8409314ddf16f16a78b44b93d7a (patch)
tree340880b7733c3201617de53a989a83c6a76d8f1f /extmod/modframebuf.c
parentd2276f0d41c2fa66a224725fdb2411846c91cf1a (diff)
examples/natmod/framebuf: Enable FrameBuffer.poly method.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'extmod/modframebuf.c')
-rw-r--r--extmod/modframebuf.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/extmod/modframebuf.c b/extmod/modframebuf.c
index 693e837f7..f3ce5b5ef 100644
--- a/extmod/modframebuf.c
+++ b/extmod/modframebuf.c
@@ -577,9 +577,7 @@ static mp_obj_t framebuf_ellipse(size_t n_args, const mp_obj_t *args_in) {
}
static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(framebuf_ellipse_obj, 6, 8, framebuf_ellipse);
-#if MICROPY_PY_ARRAY && !MICROPY_ENABLE_DYNRUNTIME
-// TODO: poly needs mp_binary_get_size & mp_binary_get_val_array which aren't
-// available in dynruntime.h yet.
+#if MICROPY_PY_ARRAY
static mp_int_t poly_int(mp_buffer_info_t *bufinfo, size_t index) {
return mp_obj_get_int(mp_binary_get_val_array(bufinfo->typecode, bufinfo->buf, index));
@@ -696,7 +694,8 @@ static mp_obj_t framebuf_poly(size_t n_args, const mp_obj_t *args_in) {
return mp_const_none;
}
static MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(framebuf_poly_obj, 5, 6, framebuf_poly);
-#endif // MICROPY_PY_ARRAY && !MICROPY_ENABLE_DYNRUNTIME
+
+#endif // MICROPY_PY_ARRAY
static mp_obj_t framebuf_blit(size_t n_args, const mp_obj_t *args_in) {
mp_obj_framebuf_t *self = MP_OBJ_TO_PTR(args_in[0]);