xbt_dynar_free_container(dynar);
}
}
-
+/** \brief free a dynar passed as void* (handy to store dynar in dynars or dict) */
+void xbt_dynar_free_voidp(void *d) {
+ xbt_dynar_free( (xbt_dynar_t*) d);
+}
+
/** @brief Count of dynar's elements
*
* \param dynar the dynar we want to mesure
/** @brief Retrieve a copy of the Nth element of a dynar.
*
* \param dynar information dealer
- * \param idx index of the slot we want to retrive
+ * \param idx index of the slot we want to retrieve
* \param[out] dst where to put the result to.
*/
void
}
-/* doxygen_first_cruft*/
+/* doxygen_string_cruft */
/* The function we will use to free the data */
static void free_string(void *d){
xbt_dynar_free(&d);
xbt_test_add1("==== Push %d strings, set them again 3 times, shift them",NB_ELEM);
- d=xbt_dynar_new(sizeof(char*),&free_string);
/* Populate_str [doxygen cruft] */
+ d=xbt_dynar_new(sizeof(char*),&free_string);
/* 1. Populate the dynar */
for (cpt=0; cpt< NB_ELEM; cpt++) {
sprintf(buf,"%d",cpt);
s2,buf);
free(s2);
}
- xbt_dynar_free(&d);
- xbt_dynar_free(&d);
+ xbt_dynar_free(&d); /* end_of_doxygen */
}
#endif /* SIMGRID_TEST */