@@ -710,14 +710,14 @@ def register_int_ptr_type(convertor, *types):
710
710
#define LV_OBJ_T {obj_type}
711
711
712
712
typedef struct mp_lv_obj_type_t {{
713
- mp_obj_full_type_t mp_obj_type;
714
713
const lv_obj_class_t *lv_obj_class;
714
+ mp_obj_type_t mp_obj_type;
715
715
}} mp_lv_obj_type_t;
716
716
717
717
STATIC const mp_lv_obj_type_t mp_lv_{base_obj}_type;
718
718
STATIC const mp_lv_obj_type_t *mp_lv_obj_types[];
719
719
720
- STATIC inline const mp_obj_full_type_t *get_BaseObj_type()
720
+ STATIC inline const mp_obj_type_t *get_BaseObj_type()
721
721
{{
722
722
return &mp_lv_{base_obj}_type.mp_obj_type;
723
723
}}
@@ -745,8 +745,6 @@ def register_int_ptr_type(convertor, *types):
745
745
#endif // __GNUC__
746
746
#endif // GENMPY_UNUSED
747
747
748
- #define MP_DEFINE_CONST_OBJ_FULL_TYPE(...) MP_DEFINE_CONST_OBJ_TYPE_EXPAND(MP_DEFINE_CONST_OBJ_TYPE_NARGS(__VA_ARGS__, _INV, 12, _INV, 11, _INV, 10, _INV, 9, _INV, 8, _INV, 7, _INV, 6, _INV, 5, _INV, 4, _INV, 3, _INV, 2, _INV, 1, _INV, 0)(mp_obj_full_type_t, __VA_ARGS__))
749
-
750
748
// Custom function mp object
751
749
752
750
typedef mp_obj_t (*mp_fun_ptr_var_t)(size_t n, const mp_obj_t *, void *ptr);
@@ -908,7 +906,7 @@ def register_int_ptr_type(convertor, *types):
908
906
return mp_lv_obj->callbacks;
909
907
}
910
908
911
- STATIC inline const mp_obj_full_type_t *get_BaseObj_type();
909
+ STATIC inline const mp_obj_type_t *get_BaseObj_type();
912
910
913
911
STATIC void mp_lv_delete_cb(lv_event_t * e)
914
912
{
@@ -928,7 +926,7 @@ def register_int_ptr_type(convertor, *types):
928
926
if (!self)
929
927
{
930
928
// Find the object type
931
- const mp_obj_full_type_t *mp_obj_type = get_BaseObj_type();
929
+ const mp_obj_type_t *mp_obj_type = get_BaseObj_type();
932
930
const lv_obj_class_t *lv_obj_class = lv_obj_get_class(lv_obj);
933
931
const mp_lv_obj_type_t **iter = &mp_lv_obj_types[0];
934
932
for (; *iter; iter++) {
@@ -1539,7 +1537,7 @@ def register_int_ptr_type(convertor, *types):
1539
1537
1540
1538
STATIC MP_DEFINE_CONST_DICT(mp_base_struct_locals_dict, mp_base_struct_locals_dict_table);
1541
1539
1542
- MP_DEFINE_CONST_OBJ_TYPE(
1540
+ STATIC MP_DEFINE_CONST_OBJ_TYPE(
1543
1541
mp_lv_base_struct_type,
1544
1542
MP_QSTR_Struct,
1545
1543
MP_TYPE_FLAG_NONE,
@@ -1550,7 +1548,7 @@ def register_int_ptr_type(convertor, *types):
1550
1548
);
1551
1549
1552
1550
// TODO: provide constructor
1553
- MP_DEFINE_CONST_OBJ_TYPE(
1551
+ STATIC MP_DEFINE_CONST_OBJ_TYPE(
1554
1552
mp_lv_array_type,
1555
1553
MP_QSTR_C_Array,
1556
1554
MP_TYPE_FLAG_NONE,
@@ -2622,7 +2620,7 @@ def gen_obj(obj_name):
2622
2620
2623
2621
{ctor}
2624
2622
2625
- STATIC MP_DEFINE_CONST_OBJ_FULL_TYPE (
2623
+ STATIC MP_DEFINE_CONST_OBJ_TYPE (
2626
2624
mp_lv_{obj}_type_base,
2627
2625
MP_QSTR_{obj},
2628
2626
MP_TYPE_FLAG_NONE,
@@ -2636,10 +2634,10 @@ def gen_obj(obj_name):
2636
2634
);
2637
2635
2638
2636
STATIC const mp_lv_obj_type_t mp_lv_{obj}_type = {{
2639
- .mp_obj_type = mp_lv_{obj}_type_base,
2640
2637
#ifdef LV_OBJ_T
2641
- .lv_obj_class = {lv_class}
2638
+ .lv_obj_class = {lv_class},
2642
2639
#endif
2640
+ .mp_obj_type = mp_lv_{obj}_type_base,
2643
2641
}};
2644
2642
""" .format (
2645
2643
module_name = module_name ,
0 commit comments