diff options
| author | Kenny <3454741+WarriorOfWire@users.noreply.github.com> | 2020-07-19 12:27:35 -0700 |
|---|---|---|
| committer | Kenny <3454741+WarriorOfWire@users.noreply.github.com> | 2020-07-19 12:27:35 -0700 |
| commit | efeae0d84fa1745595d26e66590c1944269b6aae (patch) | |
| tree | 54a911a7f0952da5ad499ae19053e0ea18adf6cb /shared-bindings/vectorio | |
| parent | 9cdf5e148a8fcc506da6e2a8598fa2963bbcde2e (diff) | |
fix 3169: Polygon.points property
The getter for vectorio.Polygon#points was not updated with the data type change of the stored points list.
This moves the implementation to shared_module and updates the data type to reflect the actual state.
Diffstat (limited to 'shared-bindings/vectorio')
| -rw-r--r-- | shared-bindings/vectorio/Polygon.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/shared-bindings/vectorio/Polygon.c b/shared-bindings/vectorio/Polygon.c index 3443d9e42..1aca4611e 100644 --- a/shared-bindings/vectorio/Polygon.c +++ b/shared-bindings/vectorio/Polygon.c @@ -49,20 +49,7 @@ static mp_obj_t vectorio_polygon_make_new(const mp_obj_type_t *type, size_t n_ar //| STATIC mp_obj_t vectorio_polygon_obj_get_points(mp_obj_t self_in) { vectorio_polygon_t *self = MP_OBJ_TO_PTR(self_in); - mp_obj_t list = mp_obj_new_list(0, NULL); - - size_t len = 0; - mp_obj_t *items; - mp_obj_list_get(common_hal_vectorio_polygon_get_points(self), &len, &items); - - for (size_t i = 0; i < len; i += 2) { - mp_obj_t tuple[] = { items[i], items[i+1] }; - mp_obj_list_append( - list, - mp_obj_new_tuple(2, tuple) - ); - } - return list; + return common_hal_vectorio_polygon_get_points(self); } MP_DEFINE_CONST_FUN_OBJ_1(vectorio_polygon_get_points_obj, vectorio_polygon_obj_get_points); |
