#include <sys/types.h> /* size_t */
#include <stdarg.h>
-
-/*! C++ users need love */
-#ifndef BEGIN_DECL
-# ifdef __cplusplus
-# define BEGIN_DECL extern "C" {
-# else
-# define BEGIN_DECL
-# endif
-#endif
-
-/*! C++ users need love */
-#ifndef END_DECL
-# ifdef __cplusplus
-# define END_DECL }
-# else
-# define END_DECL
-# endif
-#endif
-/* End of cruft for C++ */
+#include "xbt/misc.h" /* BEGIN_DECL */
BEGIN_DECL
-
/**
* gras_datadesc_type_t:
*
**** Declare datadescription yourself ****
******************************************/
-gras_error_t
-gras_datadesc_struct(const char *name,
- gras_datadesc_type_t **dst);
-gras_error_t
-gras_datadesc_struct_append(gras_datadesc_type_t *struct_type,
- const char *name,
- gras_datadesc_type_t *field_type);
+gras_datadesc_type_t *
+ gras_datadesc_struct(const char *name);
+
void
-gras_datadesc_struct_close(gras_datadesc_type_t *struct_type);
-gras_error_t
-gras_datadesc_union(const char *name,
- gras_datadesc_type_cb_int_t selector,
- gras_datadesc_type_t **dst);
-gras_error_t
-gras_datadesc_union_append(gras_datadesc_type_t *union_type,
- const char *name,
- gras_datadesc_type_t *field_type);
+ gras_datadesc_struct_append(gras_datadesc_type_t *struct_type,
+ const char *name,
+ gras_datadesc_type_t *field_type);
void
-gras_datadesc_union_close(gras_datadesc_type_t *union_type);
-gras_error_t
-gras_datadesc_ref(const char *name,
- gras_datadesc_type_t *referenced_type,
- gras_datadesc_type_t **dst);
-gras_error_t
-gras_datadesc_ref_generic(const char *name,
- gras_datadesc_selector_t selector,
- gras_datadesc_type_t **dst);
-gras_error_t
-gras_datadesc_array_fixed(const char *name,
- gras_datadesc_type_t *element_type,
- long int fixed_size,
- gras_datadesc_type_t **dst);
-gras_error_t
-gras_datadesc_array_dyn(const char *name,
- gras_datadesc_type_t *element_type,
- gras_datadesc_type_cb_int_t dynamic_size,
- gras_datadesc_type_t **dst);
-gras_error_t
-gras_datadesc_ref_pop_arr(gras_datadesc_type_t *element_type,
- gras_datadesc_type_t **dst);
+ gras_datadesc_struct_close(gras_datadesc_type_t *struct_type);
+
+gras_datadesc_type_t *
+ gras_datadesc_union(const char *name,
+ gras_datadesc_type_cb_int_t selector);
+void
+ gras_datadesc_union_append(gras_datadesc_type_t *union_type,
+ const char *name,
+ gras_datadesc_type_t *field_type);
+void
+ gras_datadesc_union_close(gras_datadesc_type_t *union_type);
+
+gras_datadesc_type_t *
+ gras_datadesc_ref(const char *name,
+ gras_datadesc_type_t *referenced_type);
+gras_datadesc_type_t *
+ gras_datadesc_ref_generic(const char *name,
+ gras_datadesc_selector_t selector);
+
+gras_datadesc_type_t *
+ gras_datadesc_array_fixed(const char *name,
+ gras_datadesc_type_t *element_type,
+ long int fixed_size);
+gras_datadesc_type_t *
+ gras_datadesc_array_dyn(const char *name,
+ gras_datadesc_type_t *element_type,
+ gras_datadesc_type_cb_int_t dynamic_size);
+
+gras_datadesc_type_t *
+ gras_datadesc_ref_pop_arr(gras_datadesc_type_t *element_type);
/*********************************
* Change stuff within datadescs *
*********************************/
+void gras_datadesc_cycle_set(gras_datadesc_type_t *type);
+void gras_datadesc_cycle_unset(gras_datadesc_type_t *type);
+
void gras_datadesc_cb_send (gras_datadesc_type_t *type,
gras_datadesc_type_cb_void_t pre);
void gras_datadesc_cb_recv(gras_datadesc_type_t *type,