Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Factorize code for xbt_dynar_set/xbt_dynar_set_at_ptr.
[simgrid.git] / src / xbt / dict.c
index 83e73b5..c054fb5 100644 (file)
@@ -32,7 +32,7 @@ static void dict_mallocator_reset_f(void *dict);
 /**
  * \brief Constructor
  * \return pointer to the destination
- * \see xbt_dict_new_ext(), xbt_dict_free()
+ * \see xbt_dict_free()
  *
  * Creates and initialize a new dictionary with a default hashtable size.
  */
@@ -658,7 +658,7 @@ void xbt_dict_dump_output_string(void *s)
  */
 XBT_INLINE int xbt_dict_is_empty(xbt_dict_t dict)
 {
-  return (xbt_dict_size(dict) == 0);
+  return !dict || (xbt_dict_length(dict) == 0);
 }
 
 /**