Skip to content

Commit 6c9fca2

Browse files
committed
py/map: Remove unused new/free functions.
Maps are always allocated "statically" and (de)initialised via mp_map_init and mp_map_deinit.
1 parent 0e420d4 commit 6c9fca2

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

py/map.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,6 @@ void mp_map_init_fixed_table(mp_map_t *map, size_t n, const mp_obj_t *table) {
9393
map->table = (mp_map_elem_t*)table;
9494
}
9595

96-
mp_map_t *mp_map_new(size_t n) {
97-
mp_map_t *map = m_new(mp_map_t, 1);
98-
mp_map_init(map, n);
99-
return map;
100-
}
101-
10296
// Differentiate from mp_map_clear() - semantics is different
10397
void mp_map_deinit(mp_map_t *map) {
10498
if (!map->is_fixed) {
@@ -107,11 +101,6 @@ void mp_map_deinit(mp_map_t *map) {
107101
map->used = map->alloc = 0;
108102
}
109103

110-
void mp_map_free(mp_map_t *map) {
111-
mp_map_deinit(map);
112-
m_del_obj(mp_map_t, map);
113-
}
114-
115104
void mp_map_clear(mp_map_t *map) {
116105
if (!map->is_fixed) {
117106
m_del(mp_map_elem_t, map->table, map->alloc);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy