*/
XBT_INLINE unsigned int xbt_dict_size(xbt_dict_t dict)
{
- return dict->count;
+ return (dict ? (unsigned int) dict->count : (unsigned int) 0);
}
/**
{
fputs(s, stdout);
}
-
+/**
+ * \brief test if the dict is empty or not
+ */
+XBT_INLINE int xbt_dict_is_empty(xbt_dict_t dict)
+{
+ return (xbt_dict_size(dict) == 0);
+}
/**
* \brief Outputs the content of the structure (debugging purpose)