X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9f6cbb176d4301cae36a945dfa57e6b6a9cbafef..0c1113a3d64447cac78d831318fd050b8d2ae9a4:/include/xbt/dynar.h diff --git a/include/xbt/dynar.h b/include/xbt/dynar.h index 9ac385ff20..8aa9d0db01 100644 --- a/include/xbt/dynar.h +++ b/include/xbt/dynar.h @@ -203,7 +203,7 @@ typedef struct xbt_dynar_s { void_f_pvoid_t free_f; } s_xbt_dynar_t; -static XBT_INLINE int _xbt_dynar_cursor_get(const xbt_dynar_t dynar, unsigned int idx, void *const dst) +static inline int _xbt_dynar_cursor_get(const xbt_dynar_t dynar, unsigned int idx, void *const dst) { if (!dynar) /* iterating over a NULL dynar is a no-op */ return FALSE; @@ -256,6 +256,17 @@ xbt_dynar_foreach (dyn,cpt,str) { (_cursor)++ ) #endif /** @} */ - SG_END_DECL() + +#ifdef __cplusplus +namespace simgrid { +namespace xbt { + inline void destroy(xbt_dynar_t s) + { + xbt_dynar_free(&s); + } +} +} +#endif + #endif /* _XBT_DYNAR_H */