py/parse: Make mp_parse_node_extract_list return size_t instead of int.

Because this function can only return non-negative values, and having the
correct return type gives more information to the caller.
This commit is contained in:
Damien George
2020-05-04 22:11:44 +10:00
parent 035059eaf5
commit 172fc040aa
3 changed files with 33 additions and 33 deletions

View File

@@ -85,7 +85,7 @@ static inline mp_parse_node_t mp_parse_node_new_leaf(size_t kind, mp_int_t arg)
bool mp_parse_node_is_const_false(mp_parse_node_t pn);
bool mp_parse_node_is_const_true(mp_parse_node_t pn);
bool mp_parse_node_get_int_maybe(mp_parse_node_t pn, mp_obj_t *o);
int mp_parse_node_extract_list(mp_parse_node_t *pn, size_t pn_kind, mp_parse_node_t **nodes);
size_t mp_parse_node_extract_list(mp_parse_node_t *pn, size_t pn_kind, mp_parse_node_t **nodes);
void mp_parse_node_print(mp_parse_node_t pn, size_t indent);
typedef enum {