*(void **) r_ref);
if (detect_cycle)
- xbt_dict_set_ext(refs, (const char *) r_ref, r_len, ptr, xbt_free_f);
+ xbt_dict_set_ext(refs, (const char *) r_ref, r_len, ptr, NULL);
}
}
/* Detect the referenced type */
sub_type = ref_data.type;
if (sub_type == NULL) {
- sub_type = (*ref_data.selector) (type, state, src);
+ sub_type = ref_data.selector(type, state, src);
}
/* Send the pointed data only if not already sent */
dst);
if (!state) {
state = gras_cbps_new();
- refs = xbt_dict_new();
+ refs = xbt_dict_new_homogeneous(xbt_free_f);
}
TRY {
size =
gras_datadesc_memcpy_rec(state, refs, type, (char *) src,
(char *) dst, 0, type->cycle);
- } TRY_CLEANUP {
+ }
+ TRY_CLEANUP {
xbt_dict_reset(refs);
gras_cbps_reset(state);
}
/* Detect the referenced type and send it to peer if needed */
sub_type = ref_data.type;
if (sub_type == NULL) {
- sub_type = (*ref_data.selector) (type, state, data);
+ sub_type = ref_data.selector(type, state, data);
gras_dd_send_int(sock, &(sub_type->code), 1 /*stable */ );
}
if (!state) {
state = gras_cbps_new();
- refs = xbt_dict_new();
+ refs = xbt_dict_new_homogeneous(NULL);
}
TRY {
gras_datadesc_send_rec(sock, state, refs, type, (char *) src,
type->cycle);
- } TRY_CLEANUP {
+ }
+ TRY_CLEANUP {
xbt_dict_reset(refs);
gras_cbps_reset(state);
}
if (!state) {
state = gras_cbps_new();
- refs = xbt_dict_new();
+ refs = xbt_dict_new_homogeneous(xbt_free_f);
}
xbt_assert(type, "called with NULL type descriptor");
TRY {
gras_datadesc_recv_rec(sock, state, refs, type,
r_arch, NULL, 0, (char *) dst, -1, type->cycle);
- } TRY_CLEANUP {
+ }
+ TRY_CLEANUP {
xbt_dict_reset(refs);
gras_cbps_reset(state);
}