+ xbt_dynar_free_container(&frame); /* we just emptied it */
+ XBT_DEBUG("<<< Block end");
+}
+
+
+/** \brief Push a new integer value into the cbps. */
+void gras_cbps_i_push(gras_cbps_t ps, int val)
+{
+ XBT_DEBUG("push %d as a size", val);
+ xbt_dynar_push_as(ps->lints, int, val);
+}
+
+/** \brief Pop the lastly pushed integer value from the cbps. */
+int gras_cbps_i_pop(gras_cbps_t ps)
+{
+ int ret;
+
+ xbt_assert(xbt_dynar_length(ps->lints) > 0,
+ "gras_cbps_i_pop: no value to pop");
+ ret = xbt_dynar_pop_as(ps->lints, int);
+ XBT_DEBUG("pop %d as a size", ret);
+ return ret;
+}
+
+/** \brief Generic cb returning the lastly pushed value
+ *
+ * Used by \ref gras_datadesc_ref_pop_arr
+ */
+int gras_datadesc_cb_pop(gras_datadesc_type_t ignored, gras_cbps_t vars,
+ void *data)
+{
+ return gras_cbps_i_pop(vars);
+}
+
+/* ************************* */
+/* **** PUSHy callbacks **** */
+/* ************************* */
+
+/** \brief Cb to push an integer. Must be attached to the field you want to push */
+void gras_datadesc_cb_push_int(gras_datadesc_type_t ignored,
+ gras_cbps_t vars, void *data)
+{
+ int *i = (int *) data;
+ gras_cbps_i_push(vars, (int) *i);
+}
+
+/** \brief Cb to push an unsigned integer. Must be attached to the field you want to push */
+void gras_datadesc_cb_push_uint(gras_datadesc_type_t ignored,
+ gras_cbps_t vars, void *data)
+{
+ unsigned int *i = (unsigned int *) data;
+ gras_cbps_i_push(vars, (int) *i);
+}
+
+/** \brief Cb to push an long integer. Must be attached to the field you want to push
+ */
+void gras_datadesc_cb_push_lint(gras_datadesc_type_t ignored,
+ gras_cbps_t vars, void *data)
+{
+ long int *i = (long int *) data;
+ gras_cbps_i_push(vars, (int) *i);
+}
+
+/** \brief Cb to push an unsigned long integer. Must be attached to the field you want to push
+ */
+void gras_datadesc_cb_push_ulint(gras_datadesc_type_t ignored,
+ gras_cbps_t vars, void *data)
+{
+ unsigned long int *i = (unsigned long int *) data;
+ gras_cbps_i_push(vars, (int) *i);
+}
+
+/* ************************************ */
+/* **** PUSHy multiplier callbacks **** */
+/* ************************************ */
+/** \brief Cb to push an integer as multiplier. Must be attached to the field you want to push */
+void gras_datadesc_cb_push_int_mult(gras_datadesc_type_t ignored,
+ gras_cbps_t vars, void *data)
+{
+ int old = *(int *) data;
+ int new = gras_cbps_i_pop(vars);
+ XBT_DEBUG("push %d x %d as a size", old, new);
+ gras_cbps_i_push(vars, old * new);