- type = xbt_dict_get_or_null(all_types, new_type_id1);
- while(type->size == 0 && type->dw_type_id != NULL)
- type = xbt_dict_get_or_null(all_types, type->dw_type_id);
- new_size1 = type->size;
- type = xbt_dict_get_or_null(all_types, new_type_id2);
- while(type->size == 0 && type->dw_type_id != NULL)
- type = xbt_dict_get_or_null(all_types, type->dw_type_id);
- new_size2 = type->size;
+ if(switch_type){
+ type = xbt_dict_get_or_null(other_types, new_type_id1);
+ while(type->byte_size == 0 && type->dw_type_id != NULL)
+ type = xbt_dict_get_or_null(other_types, type->dw_type_id);
+ new_size1 = type->byte_size;
+ type = xbt_dict_get_or_null(other_types, new_type_id2);
+ while(type->byte_size == 0 && type->dw_type_id != NULL)
+ type = xbt_dict_get_or_null(other_types, type->dw_type_id);
+ new_size2 = type->byte_size;
+ }else{
+ type = xbt_dict_get_or_null(all_types, new_type_id1);
+ while(type->byte_size == 0 && type->dw_type_id != NULL)
+ type = xbt_dict_get_or_null(all_types, type->dw_type_id);
+ new_size1 = type->byte_size;
+ type = xbt_dict_get_or_null(all_types, new_type_id2);
+ while(type->byte_size == 0 && type->dw_type_id != NULL)
+ type = xbt_dict_get_or_null(all_types, type->dw_type_id);
+ new_size2 = type->byte_size;
+ }