Add the macro 'ABG_DEPRECATED' to mark APIs as to be removed in a next
major release. APIs marked with that flag are supposed to work as
before, but might come with downsides. E.g. they could perform worse or
provide only limited functionality. All deprecated functions shall come
with a hint to equivalent functionality within the non-deprecated part
of the API.
* include/abg-fwd.h: Introduce deprecation macro ABG_DEPRECATED
Signed-off-by: Matthias Maennich <maennich@google.com>
#define ABG_ASSERT(cond) do {({bool __abg_cond__ = (cond); assert(__abg_cond__); !!__abg_cond__;});} while (false)
#endif
+/// Define ABG_DEPRECATED to allow marking parts of the API deprecated without
+/// actually removing it. This allows to keep compatible (yet incomplete) APIs
+/// around for a transition period into a major version.
+#ifdef __GNUC__
+#define ABG_DEPRECATED __attribute__((deprecated))
+#else
+#define ABG_DEPRECATED
+#endif
+
} // end namespace abigail
#endif // __ABG_IRFWD_H__