- //FIXME : copy those or assume they won't be freed ?
- new_t->block_lengths = block_lengths;
- new_t->block_indices = block_indices;
+ //TODO : add a custom function for each time to clean these
+ new_t->block_lengths= xbt_new(int, block_count);
+ new_t->block_indices= xbt_new(MPI_Aint, block_count);
+ new_t->old_types= xbt_new(MPI_Datatype, block_count);
+ int i;
+ for(i=0;i<block_count;i++){
+ new_t->block_lengths[i]=block_lengths[i];
+ new_t->block_indices[i]=block_indices[i];
+ new_t->old_types[i]=old_types[i];
+ }
+ //new_t->block_lengths = block_lengths;
+ //new_t->block_indices = block_indices;