]> sourceware.org Git - libabigail.git/commitdiff
Add deprecation facilities
authorMatthias Maennich <maennich@google.com>
Tue, 21 May 2019 04:39:14 +0000 (05:39 +0100)
committerDodji Seketeli <dodji@redhat.com>
Wed, 22 May 2019 12:33:45 +0000 (14:33 +0200)
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>
include/abg-fwd.h

index ddec06d8d29c500b7bf41279dd3a98ef11b59087..e9258008f963e76fb7400d8f8563b9a81a052453 100644 (file)
@@ -1342,5 +1342,14 @@ dump_decl_location(const decl_base_sptr&);
 #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__
This page took 0.033934 seconds and 5 git commands to generate.