From 073b161309cc81f4c761fcb13e5e7cdae7ec145c Mon Sep 17 00:00:00 2001 From: iabdalkader Date: Sat, 22 Jun 2024 12:58:04 +0200 Subject: [PATCH] modules/py_image: Export py_image_type for use by other modules. --- src/omv/modules/py_image.c | 4 ++-- src/omv/modules/py_image.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/omv/modules/py_image.c b/src/omv/modules/py_image.c index 2c54d5f72..5a2a023a1 100644 --- a/src/omv/modules/py_image.c +++ b/src/omv/modules/py_image.c @@ -35,7 +35,7 @@ #include "py_imageio.h" #endif -static const mp_obj_type_t py_image_type; +const mp_obj_type_t py_image_type; #if defined(IMLIB_ENABLE_IMAGE_FILE_IO) extern const char *ffs_strerror(FRESULT res); @@ -6492,7 +6492,7 @@ static const mp_rom_map_elem_t locals_dict_table[] = { STATIC MP_DEFINE_CONST_DICT(py_image_locals_dict, locals_dict_table); -STATIC MP_DEFINE_CONST_OBJ_TYPE( +MP_DEFINE_CONST_OBJ_TYPE( py_image_type, MP_QSTR_Image, MP_TYPE_FLAG_ITER_IS_GETITER, diff --git a/src/omv/modules/py_image.h b/src/omv/modules/py_image.h index 93dd9f125..5a1eb8b60 100644 --- a/src/omv/modules/py_image.h +++ b/src/omv/modules/py_image.h @@ -11,6 +11,7 @@ #ifndef __PY_IMAGE_H__ #define __PY_IMAGE_H__ #include "imlib.h" +extern const mp_obj_type_t py_image_type; mp_obj_t py_image(int width, int height, pixformat_t pixfmt, uint32_t size, void *pixels); mp_obj_t py_image_from_struct(image_t *img); void *py_image_cobj(mp_obj_t img_obj);