From 5ecf4f37c0583b9fddd2e11b8236b6feacdde296 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Mon, 29 Oct 2018 11:06:29 +0100 Subject: [PATCH] Change deprecated functions. --- example/ex-dict02.c | 4 ++-- example/ex-dict03.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/example/ex-dict02.c b/example/ex-dict02.c index 13d38ef1..63639d11 100644 --- a/example/ex-dict02.c +++ b/example/ex-dict02.c @@ -15,7 +15,7 @@ int main(void) { char *k = dict_m32_get(h, 10); // No 10 in h, so k == NULL int is_missing = (k != NULL); // true assert (is_missing); - dict_m32_remove(h, 5); // h is now empty + dict_m32_erase(h, 5); // h is now empty dict_m32_it_t it; // iterate over all dictionnary for (dict_m32_it (it, h) ; !dict_m32_end_p (it); dict_m32_next(it)) { struct dict_m32_pair_s *item = dict_m32_ref(it); @@ -33,7 +33,7 @@ int main(void) { char *k = dict_m32_get(h, 10); // k == NULL int is_missing = (k != NULL); // true assert (is_missing); - dict_m32_remove(h, 5); // h is now empty + dict_m32_erase(h, 5); // h is now empty for M_EACH(item, h, M32_OPLIST) { // traverse each item item->value = 1; // Set its value to 1 } diff --git a/example/ex-dict03.c b/example/ex-dict03.c index fd03fc36..f6b62fed 100644 --- a/example/ex-dict03.c +++ b/example/ex-dict03.c @@ -50,7 +50,7 @@ int main(void) printf("Enter the mapped string to be deleted: "); string_fgets (str, stdin, STRING_READ_PURE_LINE); s = atoi(string_get_cstr(str)); - dict_map_remove(mp, s); + dict_map_erase(mp, s); break; case 3: