/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
if (old_data) {
memcpy(new_data, old_data, used_length);
_xbt_clear_mem(old_data, old_length);
if (old_data) {
memcpy(new_data, old_data, used_length);
_xbt_clear_mem(old_data, old_length);
dst=xbt_malloc(dynar->elmsize);
xbt_dynar_remove_at(dynar,(*cursor)--,dst);
(dynar->free_f)(dst);
dst=xbt_malloc(dynar->elmsize);
xbt_dynar_remove_at(dynar,(*cursor)--,dst);
(dynar->free_f)(dst);
} else {
DEBUG0("Ok, we dont care about the element without free function");
xbt_dynar_remove_at(dynar,(*cursor)--,NULL);
} else {
DEBUG0("Ok, we dont care about the element without free function");
xbt_dynar_remove_at(dynar,(*cursor)--,NULL);