static gras_error_t
gras_dd_send_int(gras_socket_t *sock,int i) {
- gras_error_t errcode;
- if (!int_type)
- TRY(gras_datadesc_by_name("int", &int_type));
-
+ if (!int_type) {
+ int_type = gras_datadesc_by_name("int");
+ gras_assert(int_type);
+ }
+
DEBUG1("send_int(%d)",i);
return gras_trp_chunk_send(sock, (char*)&i, int_type->size[GRAS_THISARCH]);
}
gras_dd_recv_int(gras_socket_t *sock, int r_arch, int *i) {
gras_error_t errcode;
- if (!int_type)
- TRY(gras_datadesc_by_name("int", &int_type));
+ if (!int_type) {
+ int_type = gras_datadesc_by_name("int");
+ gras_assert(int_type);
+ }
if (int_type->size[GRAS_THISARCH] >= int_type->size[r_arch]) {
TRY(gras_trp_chunk_recv(sock, (char*)i, int_type->size[r_arch]));
DEBUG2("Insert %p under %p",*(void**)ptr, *(void**)r_ref);
/* FIXME: Leaking on the ptr. Do I really need to copy it? */
- TRY(gras_dict_insert_ext(refs,(const char *) r_ref, r_len, ptr, NULL));
+ TRY(gras_dict_set_ext(refs,(const char *) r_ref, r_len, ptr, NULL));
}
return no_error;
}
}
/* Send the actual value of the pointer for cycle handling */
- if (!pointer_type)
- TRY(gras_datadesc_by_name("data pointer", &pointer_type));
+ if (!pointer_type) {
+ pointer_type = gras_datadesc_by_name("data pointer");
+ gras_assert(pointer_type);
+ }
+
TRY(gras_trp_chunk_send(sock, (char*)data,
pointer_type->size[GRAS_THISARCH]));
VERB0("Not sending NULL referenced data");
break;
}
- errcode = gras_dict_retrieve_ext(refs,(char*)ref, sizeof(void*), &dummy);
+ errcode = gras_dict_get_ext(refs,(char*)ref, sizeof(void*), &dummy);
if (errcode == mismatch_error) {
VERB1("Sending data referenced at %p", *ref);
- TRY(gras_dict_insert_ext(refs, (char*)ref, sizeof(void*), ref, NULL));
+ TRY(gras_dict_set_ext(refs, (char*)ref, sizeof(void*), ref, NULL));
TRY(gras_datadesc_by_id(ref_code, &sub_type));
TRY(gras_datadesc_send_rec(sock,state,refs, sub_type, *ref));
TRY(gras_dd_recv_int(sock, r_arch, &ref_code));
/* Get the actual value of the pointer for cycle handling */
- if (!pointer_type)
- TRY(gras_datadesc_by_name("data pointer", &pointer_type));
+ if (!pointer_type) {
+ pointer_type = gras_datadesc_by_name("data pointer");
+ gras_assert(pointer_type);
+ }
if (! (r_ref = malloc((size_t)pointer_type->size[r_arch])) )
RAISE_MALLOC;
*(void**)l_data = NULL;
break;
}
- errcode = gras_dict_retrieve_ext(refs,
- (char*)r_ref, pointer_type->size[r_arch],
- (void**)&l_ref);
+ errcode = gras_dict_get_ext(refs,
+ (char*)r_ref, pointer_type->size[r_arch],
+ (void**)&l_ref);
if (errcode == mismatch_error) {