summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2017-08-31 16:46:13 +1000
committerDamien George <damien.p.george@gmail.com>2017-08-31 16:46:13 +1000
commit6c9fca2aa911e31f6c1b48d3b950b4dc058473d4 (patch)
tree2443e8e30d1187008664c54563e39db2c99e9e8b
parent0e420d48eea1357275a7e418463f88d254049fb6 (diff)
py/map: Remove unused new/free functions.
Maps are always allocated "statically" and (de)initialised via mp_map_init and mp_map_deinit.
-rw-r--r--py/map.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/py/map.c b/py/map.c
index 6d6337229..f07b8fbd2 100644
--- a/py/map.c
+++ b/py/map.c
@@ -93,12 +93,6 @@ void mp_map_init_fixed_table(mp_map_t *map, size_t n, const mp_obj_t *table) {
map->table = (mp_map_elem_t*)table;
}
-mp_map_t *mp_map_new(size_t n) {
- mp_map_t *map = m_new(mp_map_t, 1);
- mp_map_init(map, n);
- return map;
-}
-
// Differentiate from mp_map_clear() - semantics is different
void mp_map_deinit(mp_map_t *map) {
if (!map->is_fixed) {
@@ -107,11 +101,6 @@ void mp_map_deinit(mp_map_t *map) {
map->used = map->alloc = 0;
}
-void mp_map_free(mp_map_t *map) {
- mp_map_deinit(map);
- m_del_obj(mp_map_t, map);
-}
-
void mp_map_clear(mp_map_t *map) {
if (!map->is_fixed) {
m_del(mp_map_elem_t, map->table, map->alloc);