Merge pull request #7947 from FoamyGuy/polygon_point_typecheck
validate point type is tuple in vectorio Polygon
This commit is contained in:
commit
f8cbdf88e5
|
@ -36,6 +36,7 @@ static void _clobber_points_list(vectorio_polygon_t *self, mp_obj_t points_tuple
|
|||
for (uint16_t i = 0; i < len; ++i) {
|
||||
size_t tuple_len = 0;
|
||||
mp_obj_t *tuple_items;
|
||||
mp_arg_validate_type(items[i], &mp_type_tuple, MP_QSTR_point);
|
||||
mp_obj_tuple_get(items[i], &tuple_len, &tuple_items);
|
||||
|
||||
mp_arg_validate_length(tuple_len, 2, MP_QSTR_point);
|
||||
|
|
Loading…
Reference in New Issue