X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/9f6cbb176d4301cae36a945dfa57e6b6a9cbafef..b793c5c33fafaeb08bd5520a5d166eb8c1a4360e:/include/xbt/swag.h diff --git a/include/xbt/swag.h b/include/xbt/swag.h index 87bfbb6b5f..e406066160 100644 --- a/include/xbt/swag.h +++ b/include/xbt/swag.h @@ -110,7 +110,7 @@ XBT_PUBLIC(int) xbt_swag_size(xbt_swag_t swag); #define xbt_swag_getNext(obj, offset) (((xbt_swag_hookup_t)(((char *) (obj)) + (offset)))->next) #define xbt_swag_belongs(obj, swag) (xbt_swag_getNext((obj), (swag)->offset) || (swag)->tail == (obj)) -static XBT_INLINE void *xbt_swag_getFirst(xbt_swag_t swag) +static inline void *xbt_swag_getFirst(xbt_swag_t swag) { return (swag->head); } @@ -189,4 +189,16 @@ static XBT_INLINE void *xbt_swag_getFirst(xbt_swag_t swag) /* @} */ SG_END_DECL() + +#ifdef __cplusplus +namespace simgrid { +namespace xbt { + inline void destroy(xbt_swag_t s) + { + xbt_swag_free(s); + } +} +} +#endif + #endif /* _XBT_SWAG_H */