mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-24 20:08:10 +01:00
lib: define NOTMUCH_DEPRECATED macro, document its use.
This has been tested with gcc and clang.
This commit is contained in:
parent
e6ad3a5dd4
commit
7e2d0ef105
3 changed files with 13 additions and 1 deletions
10
devel/STYLE
10
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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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__ */
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue