diff options
| author | David Bremner <david@tethera.net> | 2015-06-07 17:01:54 +0200 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2015-08-04 09:11:17 +0200 |
| commit | 7e2d0ef10588b37922a6b48ca18005ce51bc0669 (patch) | |
| tree | 5e1b376904ff568ac3193c4dc0c17e1afa933d36 | |
| parent | e6ad3a5dd4ca7a09a4760c4eb6721217cc906aaa (diff) | |
lib: define NOTMUCH_DEPRECATED macro, document its use.
This has been tested with gcc and clang.
| -rw-r--r-- | devel/STYLE | 10 | ||||
| -rw-r--r-- | doc/doxygen.cfg | 2 | ||||
| -rw-r--r-- | lib/notmuch.h | 2 |
3 files changed, 13 insertions, 1 deletions
diff --git a/devel/STYLE b/devel/STYLE index 92de42cc..24bd5482 100644 --- a/devel/STYLE +++ b/devel/STYLE @@ -93,3 +93,13 @@ libnotmuch conventions * Code which needs to be accessed from both the CLI and from libnotmuch should be factored out into libutil (under util/). + +* Deprecated functions should be marked with the NOTMUCH_DEPRECATED + macro which generates run time warnings with gcc and clang. In order + not to confuse doxygen this should go at the beginning of the + declaration like: + + NOTMUCH_DEPRECATED(major,minor) notmuch_status_t notmuch_dwim(void *arg); + + The @deprecated doxygen command can be used to generate markup in + the API docs. diff --git a/doc/doxygen.cfg b/doc/doxygen.cfg index 42b63394..c033f344 100644 --- a/doc/doxygen.cfg +++ b/doc/doxygen.cfg @@ -74,7 +74,7 @@ STRICT_PROTO_MATCHING = NO GENERATE_TODOLIST = NO GENERATE_TESTLIST = NO GENERATE_BUGLIST = NO -GENERATE_DEPRECATEDLIST= NO +GENERATE_DEPRECATEDLIST= YES ENABLED_SECTIONS = MAX_INITIALIZER_LINES = 30 SHOW_USED_FILES = NO diff --git a/lib/notmuch.h b/lib/notmuch.h index c8edc84d..9b5046b4 100644 --- a/lib/notmuch.h +++ b/lib/notmuch.h @@ -59,6 +59,8 @@ NOTMUCH_BEGIN_DECLS #define LIBNOTMUCH_MINOR_VERSION 2 #define LIBNOTMUCH_MICRO_VERSION 0 +#define NOTMUCH_DEPRECATED(major,minor) \ + __attribute__ ((deprecated ("function deprecated as of libnotmuch " #major "." #minor))) #endif /* __DOXYGEN__ */ /** |
