From: Arnaud Giersch Date: Fri, 22 Nov 2013 06:58:22 +0000 (+0100) Subject: Doc update. X-Git-Tag: v3_11_beta~227 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/231bc59a4d9b96cff5494bb76a5cbba49e5164ca Doc update. --- diff --git a/src/xbt/dynar.c b/src/xbt/dynar.c index 247a834d77..b7ed0516b6 100644 --- a/src/xbt/dynar.c +++ b/src/xbt/dynar.c @@ -687,10 +687,13 @@ XBT_PUBLIC(void) xbt_dynar_three_way_partition(xbt_dynar_t const dynar, } /** @brief Transform a dynar into a NULL terminated array. - * The dynar won't be usable afterwards. - * \param dynar the dynar to transform + * + * \param dynar the dynar to transform + * \return pointer to the first element of the array + * + * Note: The dynar won't be usable afterwards. */ -XBT_INLINE void * xbt_dynar_to_array (xbt_dynar_t dynar) +XBT_INLINE void *xbt_dynar_to_array(xbt_dynar_t dynar) { void *res; xbt_dynar_shrink(dynar, 1); @@ -700,8 +703,17 @@ XBT_INLINE void * xbt_dynar_to_array (xbt_dynar_t dynar) return res; } -/* - * Return 0 if d1 and d2 are equal and 1 if not equal +/** @brief Compare two dynars + * + * \param d1 first dynar to compare + * \param d2 second dynar to compare + * \param compar function to use to compare elements + * \return 0 if d1 and d2 are equal and 1 if not equal + * + * d1 and d2 should be dynars of pointers. The compar function takes two + * elements and returns 0 when they are considered equal, and a value different + * of zero when they are considered different. Finally, d2 is destroyed + * afterwards. */ int xbt_dynar_compare(xbt_dynar_t d1, xbt_dynar_t d2, int(*compar)(const void *, const void *))