summaryrefslogtreecommitdiffstatshomepage
path: root/py/map.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/map.c')
-rw-r--r--py/map.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/py/map.c b/py/map.c
index a06325862e..22580de821 100644
--- a/py/map.c
+++ b/py/map.c
@@ -253,6 +253,8 @@ mp_map_elem_t* mp_map_lookup(mp_map_t *map, mp_obj_t index, mp_map_lookup_kind_t
/******************************************************************************/
/* set */
+#if MICROPY_PY_BUILTINS_SET
+
void mp_set_init(mp_set_t *set, mp_uint_t n) {
set->alloc = n;
set->used = 0;
@@ -368,6 +370,8 @@ void mp_set_clear(mp_set_t *set) {
set->table = NULL;
}
+#endif // MICROPY_PY_BUILTINS_SET
+
#if defined(DEBUG_PRINT) && DEBUG_PRINT
void mp_map_dump(mp_map_t *map) {
for (mp_uint_t i = 0; i < map->alloc; i++) {