From: alegrand Date: Wed, 19 Oct 2005 14:27:09 +0000 (+0000) Subject: make g++ happy. Hope it still has the same meaning though... X-Git-Tag: v3.3~3598 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/1e7fc6623021c8649b97baa60b63c8463d02a9a3 make g++ happy. Hope it still has the same meaning though... git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1759 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/include/xbt/ex.h b/include/xbt/ex.h index 48825880c4..cd66c738ab 100644 --- a/include/xbt/ex.h +++ b/include/xbt/ex.h @@ -239,7 +239,7 @@ typedef struct { /* the static and dynamic initializers for a context structure */ #define XBT_CTX_INITIALIZER \ - { NULL, 0, { /* content */ NULL, 0, 0, \ + { NULL, 0, { /* content */ NULL, unknown_error, 0, \ /* throw point*/ NULL, NULL, NULL, 0, NULL,\ /* backtrace */ {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL},0 } } #define XBT_CTX_INITIALIZE(ctx) \ @@ -310,6 +310,12 @@ extern void __xbt_ex_terminate_default(xbt_ex_t *e); /** @brief the block for catching (ie, deal with) an exception * @hideinitializer */ +#ifdef __cplusplus +# define XBT_EX_T_CPLUSPLUSCAST (xbt_ex_t&) +#else +# define XBT_EX_T_CPLUSPLUSCAST +#endif + #define CATCH(e) \ else { \ } \ @@ -324,7 +330,7 @@ extern void __xbt_ex_terminate_default(xbt_ex_t *e); __xbt_ex_ctx_ptr->ctx_mctx = __ex_mctx_en; \ } \ if ( !(__xbt_ex_ctx()->ctx_caught) \ - || ((e) = __xbt_ex_ctx()->ctx_ex, 0)) { \ + || ((e) = XBT_EX_T_CPLUSPLUSCAST __xbt_ex_ctx()->ctx_ex, 0)) { \ } \ else