From 4ce6ceadcad294a62f6fb2b23da262dc5cad0793 Mon Sep 17 00:00:00 2001 From: John R. Lenton Date: Mon, 6 Jan 2014 17:38:47 +0000 Subject: Added dict.clear. Added 0 to the list of primes. Funky primes, these. --- py/map.h | 1 + 1 file changed, 1 insertion(+) (limited to 'py/map.h') diff --git a/py/map.h b/py/map.h index f8ca886aa..b4592c270 100644 --- a/py/map.h +++ b/py/map.h @@ -28,6 +28,7 @@ void mp_map_init(mp_map_t *map, mp_map_kind_t kind, int n); mp_map_t *mp_map_new(mp_map_kind_t kind, int n); mp_map_elem_t* mp_map_lookup_helper(mp_map_t *map, mp_obj_t index, bool add_if_not_found); mp_map_elem_t* mp_qstr_map_lookup(mp_map_t *map, qstr index, bool add_if_not_found); +void mp_map_clear(mp_map_t *map); void mp_set_init(mp_set_t *set, int n); mp_obj_t mp_set_lookup(mp_set_t *set, mp_obj_t index, bool add_if_not_found); -- cgit v1.2.3 From 0fcbaa442f538c8ffca8a7387f7dc6d280172a5c Mon Sep 17 00:00:00 2001 From: John R. Lenton Date: Mon, 6 Jan 2014 19:48:34 +0000 Subject: implemented dict.pop --- py/map.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'py/map.h') diff --git a/py/map.h b/py/map.h index b4592c270..f0a57758c 100644 --- a/py/map.h +++ b/py/map.h @@ -26,7 +26,7 @@ typedef struct _mp_set_t { int get_doubling_prime_greater_or_equal_to(int x); void mp_map_init(mp_map_t *map, mp_map_kind_t kind, int n); mp_map_t *mp_map_new(mp_map_kind_t kind, int n); -mp_map_elem_t* mp_map_lookup_helper(mp_map_t *map, mp_obj_t index, bool add_if_not_found); +mp_map_elem_t* mp_map_lookup_helper(mp_map_t *map, mp_obj_t index, bool add_if_not_found, bool remove_if_found); mp_map_elem_t* mp_qstr_map_lookup(mp_map_t *map, qstr index, bool add_if_not_found); void mp_map_clear(mp_map_t *map); -- cgit v1.2.3