Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Mark multi-level dictionaries as deprecated.
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 9 Feb 2012 12:10:36 +0000 (13:10 +0100)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 9 Feb 2012 12:10:36 +0000 (13:10 +0100)
ChangeLog
include/xbt/dict.h
src/xbt/dict.c
src/xbt/dict_multi.c

index 7142fe1..444c12f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -71,11 +71,13 @@ SimGrid (3.7) NOT RELEASED; urgency=low
 
   XBT:
   * Mallocators: allow value NULL for the reset function.
-  * Dicts: new function xbt_dict_new_homogeneous(void(*)(void*)) to
-    create homogeneous dictionaries, where all the elements share the
-    same free function. Non homogeneous dictionaries will be
-    deprecated in the next release.
-  * Dicts: dicts of scalar elements (xbt_dicti_*) are deprecated.
+  * Dicts:
+    - New function xbt_dict_new_homogeneous(void(*)(void*)) to
+      create homogeneous dictionaries, where all the elements share the
+      same free function. Non homogeneous dictionaries will be
+      deprecated in the next release.
+    - Dicts of scalar elements (xbt_dicti_*) are deprecated.
+    - Multi-level dictionaries are deprecated.
   * mmalloc module:
     - cleanups and simplifications to make it maintainable again
     - exotic features (such as memalign and valloc) were removed
index 05b34c8..056dc8f 100644 (file)
@@ -147,6 +147,8 @@ XBT_PUBLIC(int) xbt_dict_cursor_get_or_free(xbt_dict_cursor_t * cursor,
          xbt_dict_cursor_step(cursor) )
 
 /** @} */
+
+#ifdef XBT_USE_DEPRECATED
 /** @defgroup XBT_dict_multi Multi-level dictionaries
  *  @ingroup XBT_dict
  *
@@ -183,6 +185,7 @@ XBT_PUBLIC(void) xbt_multidict_remove_ext(xbt_dict_t mdict,
                                           xbt_dynar_t lens);
 
 /** @} */
+#endif
 
 SG_END_DECL()
 #endif                          /* _XBT_DICT_H */
index 61a045a..d970479 100644 (file)
@@ -1236,14 +1236,17 @@ XBT_TEST_UNIT("crash", test_dict_crash, "Crash test")
   xbt_dict_free(&head);
 }
 
+#ifdef XBT_USE_DEPRECATED
 static void str_free(void *s)
 {
   char *c = *(char **) s;
   free(c);
 }
+#endif
 
 XBT_TEST_UNIT("multicrash", test_dict_multicrash, "Multi-dict crash test")
 {
+#ifdef XBT_USE_DEPRECATED
 
 #undef NB_ELM
 #define NB_ELM 100              /*00 */
@@ -1311,5 +1314,7 @@ XBT_TEST_UNIT("multicrash", test_dict_multicrash, "Multi-dict crash test")
   xbt_dict_free(&mdict);
   xbt_dynar_free(&keys);
 
+#endif
 }
+
 #endif                          /* SIMGRID_TEST */
index 0c2e692..a6f8887 100644 (file)
@@ -6,6 +6,8 @@
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
+#ifdef XBT_USE_DEPRECATED
+
 #include "dict_private.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_dict_multi, xbt_dict,
@@ -242,3 +244,5 @@ void xbt_multidict_remove(xbt_dict_t mdict, xbt_dynar_t keys)
     RETHROW;
   }
 }
+
+#endif