A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Factorize code for xbt_dynar_set/xbt_dynar_set_at_ptr.
[simgrid.git]
/
src
/
xbt
/
dict.c
diff --git
a/src/xbt/dict.c
b/src/xbt/dict.c
index
d591e01
..
c054fb5
100644
(file)
--- a/
src/xbt/dict.c
+++ b/
src/xbt/dict.c
@@
-32,7
+32,7
@@
static void dict_mallocator_reset_f(void *dict);
/**
* \brief Constructor
* \return pointer to the destination
/**
* \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.
*/
*
* 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)
{
*/
XBT_INLINE int xbt_dict_is_empty(xbt_dict_t dict)
{
- return
(xbt_dict_size
(dict) == 0);
+ return
!dict || (xbt_dict_length
(dict) == 0);
}
/**
}
/**
@@
-684,7
+684,7
@@
void xbt_dict_dump(xbt_dict_t dict, void_f_pvoid_t output)
while (element != NULL) {
printf(" %s -> '", element->key);
if (output != NULL) {
while (element != NULL) {
printf(" %s -> '", element->key);
if (output != NULL) {
-
(*output)
(element->content);
+
output
(element->content);
}
printf("'\n");
element = element->next;
}
printf("'\n");
element = element->next;