for (i = 0; i < m->current_size; i++) {
- m->free_f(m->objects[i]);
+ (*(m->free_f))(m->objects[i]);
}
xbt_free(m->objects);
xbt_free(m);
* \see xbt_mallocator_release()
*/
void *xbt_mallocator_get(xbt_mallocator_t m) {
-
-void *object;
+ void *object;
xbt_assert0(m != NULL, "Invalid parameter");
}
else {
/* otherwise we must allocate a new object */
- object = m->new_f();
+ object = (*(m->new_f))();
}
- m->reset_f(object);
+ (*(m->reset_f))(object);
return object;
}
}
else {
/* otherwise we don't have a choice, we must free the object */
- m->free_f(object);
+ (*(m->free_f))(object);
}
}