Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Assertion to force maximum value to be greater or equal to minimum in uniform int
[simgrid.git] / include / xbt / dict.h
index 89aaba2..f27f5d3 100644 (file)
@@ -1,6 +1,6 @@
 /* xbt/dict.h -- api to a generic dictionary                                */
 
-/* Copyright (c) 2004-2018. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2004-2019. The SimGrid Team. All rights reserved.          */
 
 /* 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. */
@@ -79,7 +79,6 @@ XBT_PUBLIC xbt_dictelm_t xbt_dict_get_elm_or_null(xbt_dict_t dict, const char* k
 XBT_PUBLIC void xbt_dict_remove(xbt_dict_t dict, const char* key);
 XBT_PUBLIC void xbt_dict_reset(xbt_dict_t dict);
 XBT_PUBLIC int xbt_dict_length(xbt_dict_t dict);
-XBT_PUBLIC void xbt_dict_dump(xbt_dict_t dict, void (*output)(void*));
 XBT_PUBLIC int xbt_dict_is_empty(xbt_dict_t dict);
 
 /** @} */
@@ -159,10 +158,9 @@ xbt_dict_foreach(head, cursor, key, data) {
 }
 @endcode
  */
-#  define xbt_dict_foreach(dict,cursor,key,data)                       \
-    for (cursor=NULL, xbt_dict_cursor_first((dict),&(cursor)) ;        \
-         xbt_dict_cursor_get_or_free(&(cursor),(char**)&(key),(void**)(&data));\
-         xbt_dict_cursor_step(cursor) )
+#define xbt_dict_foreach(dict, cursor, key, data)                                                                      \
+  for ((cursor) = NULL, xbt_dict_cursor_first((dict), &(cursor));                                                      \
+       xbt_dict_cursor_get_or_free(&(cursor), (char**)&(key), (void**)&(data)); xbt_dict_cursor_step(cursor))
 
 /** @} */