X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6ee7e9c2e455536ab817ae0136acfbb53822eecd..1544c44ae892f12125f1355d83e275d8299418ed:/src/gras/DataDesc/cbps.c diff --git a/src/gras/DataDesc/cbps.c b/src/gras/DataDesc/cbps.c index 0bae0a250c..b64eb2f10c 100644 --- a/src/gras/DataDesc/cbps.c +++ b/src/gras/DataDesc/cbps.c @@ -87,13 +87,14 @@ gras_cbps_v_push(gras_cbps_t ps, TRY { varstack = xbt_dict_get(ps->space, name); - } CATCH(e) { + } + CATCH(e) { if (e.category != mismatch_error) RETHROW; XBT_DEBUG("Create a new variable stack for '%s' into the space", name); varstack = xbt_dynar_new(sizeof(gras_cbps_elm_t *), NULL); - xbt_dict_set(ps->space, varname, (void **) varstack, NULL); + xbt_dict_set(ps->space, name, (void **) varstack, NULL); xbt_ex_free(e); /* leaking, you think? only if you do not close all the openned blocks ;) */ } @@ -128,12 +129,13 @@ gras_cbps_v_pop(gras_cbps_t ps, XBT_DEBUG("pop(%s)", name); TRY { varstack = xbt_dict_get(ps->space, name); - } CATCH(e) { + } + CATCH(e) { if (e.category != mismatch_error) RETHROW; xbt_ex_free(e); - THROW1(not_found_error, 1, "Asked to pop the non-existant %s", name); + THROWF(not_found_error, 1, "Asked to pop the non-existant %s", name); } xbt_dynar_pop(varstack, &var); @@ -262,7 +264,7 @@ void gras_cbps_block_end(gras_cbps_t ps) unsigned int cursor = 0; char *name = NULL; - xbt_assert0(xbt_dynar_length(ps->frames), + xbt_assert(xbt_dynar_length(ps->frames), "More block_end than block_begin"); xbt_dynar_pop(ps->frames, &frame); @@ -302,7 +304,7 @@ int gras_cbps_i_pop(gras_cbps_t ps) { int ret; - xbt_assert0(xbt_dynar_length(ps->lints) > 0, + 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);