X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5089a0a98b27f5eeee62321dff4f025f1648f025..6e95d8018bccb24c4600c551ef6900eae41c0faa:/include/xbt/dict.h diff --git a/include/xbt/dict.h b/include/xbt/dict.h index e36d2b9558..73b6e624f9 100644 --- a/include/xbt/dict.h +++ b/include/xbt/dict.h @@ -45,6 +45,7 @@ SG_BEGIN_DECL /** @brief Dictionary data type (opaque structure) */ typedef struct s_xbt_dict *xbt_dict_t; +typedef const struct s_xbt_dict* const_xbt_dict_t; typedef struct s_xbt_dictelm *xbt_dictelm_t; typedef struct s_xbt_dictelm { char *key; @@ -124,8 +125,10 @@ struct s_xbt_dict_cursor { /** @brief Cursor on dictionaries (opaque type) */ typedef struct s_xbt_dict_cursor *xbt_dict_cursor_t; +typedef const struct s_xbt_dict_cursor* const_xbt_dict_cursor_t; -static inline xbt_dictelm_t xbt_dict_cursor_get_elm(xbt_dict_cursor_t cursor) { +static inline xbt_dictelm_t xbt_dict_cursor_get_elm(const_xbt_dict_cursor_t cursor) +{ return cursor->current; }