@@ -85,12 +85,9 @@ static mp_obj_t vectorio_rectangle_obj_set_width(mp_obj_t self_in, mp_obj_t widt
85
85
}
86
86
MP_DEFINE_CONST_FUN_OBJ_2 (vectorio_rectangle_set_width_obj , vectorio_rectangle_obj_set_width );
87
87
88
- const mp_obj_property_t vectorio_rectangle_width_obj = {
89
- .base .type = & mp_type_property ,
90
- .proxy = {(mp_obj_t )& vectorio_rectangle_get_width_obj ,
91
- (mp_obj_t )& vectorio_rectangle_set_width_obj ,
92
- MP_ROM_NONE },
93
- };
88
+ MP_PROPERTY_GETSET (vectorio_rectangle_width_obj ,
89
+ (mp_obj_t )& vectorio_rectangle_get_width_obj ,
90
+ (mp_obj_t )& vectorio_rectangle_set_width_obj );
94
91
95
92
//| height: int
96
93
//| """The height of the rectangle in pixels."""
@@ -107,12 +104,9 @@ static mp_obj_t vectorio_rectangle_obj_set_height(mp_obj_t self_in, mp_obj_t hei
107
104
}
108
105
MP_DEFINE_CONST_FUN_OBJ_2 (vectorio_rectangle_set_height_obj , vectorio_rectangle_obj_set_height );
109
106
110
- const mp_obj_property_t vectorio_rectangle_height_obj = {
111
- .base .type = & mp_type_property ,
112
- .proxy = {(mp_obj_t )& vectorio_rectangle_get_height_obj ,
113
- (mp_obj_t )& vectorio_rectangle_set_height_obj ,
114
- MP_ROM_NONE },
115
- };
107
+ MP_PROPERTY_GETSET (vectorio_rectangle_height_obj ,
108
+ (mp_obj_t )& vectorio_rectangle_get_height_obj ,
109
+ (mp_obj_t )& vectorio_rectangle_set_height_obj );
116
110
117
111
//| color_index: int
118
112
//| """The color_index of the rectangle in 1 based index of the palette."""
@@ -129,12 +123,9 @@ static mp_obj_t vectorio_rectangle_obj_set_color_index(mp_obj_t self_in, mp_obj_
129
123
}
130
124
MP_DEFINE_CONST_FUN_OBJ_2 (vectorio_rectangle_set_color_index_obj , vectorio_rectangle_obj_set_color_index );
131
125
132
- const mp_obj_property_t vectorio_rectangle_color_index_obj = {
133
- .base .type = & mp_type_property ,
134
- .proxy = {(mp_obj_t )& vectorio_rectangle_get_color_index_obj ,
135
- (mp_obj_t )& vectorio_rectangle_set_color_index_obj ,
136
- MP_ROM_NONE },
137
- };
126
+ MP_PROPERTY_GETSET (vectorio_rectangle_color_index_obj ,
127
+ (mp_obj_t )& vectorio_rectangle_get_color_index_obj ,
128
+ (mp_obj_t )& vectorio_rectangle_set_color_index_obj );
138
129
139
130
// Documentation for properties inherited from VectorShape.
140
131
0 commit comments