From: David Bremner Date: Sun, 7 Jun 2015 15:01:54 +0000 (+0200) Subject: [PATCH 01/10] lib: define NOTMUCH_DEPRECATED macro, document its use. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ce294571a379031806f3cb6ec135f21874c3366f;p=notmuch-archives.git [PATCH 01/10] lib: define NOTMUCH_DEPRECATED macro, document its use. --- diff --git a/d2/c7036be8f6f0864a44bdb572453fd097036963 b/d2/c7036be8f6f0864a44bdb572453fd097036963 new file mode 100644 index 000000000..04b647e20 --- /dev/null +++ b/d2/c7036be8f6f0864a44bdb572453fd097036963 @@ -0,0 +1,101 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 5E7D46DE119C + for ; Sun, 7 Jun 2015 08:05:58 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.216 +X-Spam-Level: +X-Spam-Status: No, score=0.216 tagged_above=-999 required=5 tests=[AWL=0.206, + T_HEADER_FROM_DIFFERENT_DOMAINS=0.01] autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id flCfBmEti7gy for ; + Sun, 7 Jun 2015 08:05:56 -0700 (PDT) +Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net + [87.98.215.224]) + by arlo.cworth.org (Postfix) with ESMTPS id A8AF36DE158D + for ; Sun, 7 Jun 2015 08:05:56 -0700 (PDT) +Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim + 4.80) (envelope-from ) + id 1Z1c8R-0004qt-5R; Sun, 07 Jun 2015 15:05:15 +0000 +Received: (nullmailer pid 7850 invoked by uid 1000); Sun, 07 Jun 2015 + 15:02:11 -0000 +From: David Bremner +To: notmuch@notmuchmail.org +Subject: [PATCH 01/10] lib: define NOTMUCH_DEPRECATED macro, document its use. +Date: Sun, 7 Jun 2015 17:01:54 +0200 +Message-Id: <1433689323-7520-2-git-send-email-david@tethera.net> +X-Mailer: git-send-email 2.1.4 +In-Reply-To: <1433689323-7520-1-git-send-email-david@tethera.net> +References: <1433689323-7520-1-git-send-email-david@tethera.net> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.18 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sun, 07 Jun 2015 15:05:58 -0000 + +This has been tested with gcc and clang. +--- + devel/STYLE | 10 ++++++++++ + doc/doxygen.cfg | 2 +- + lib/notmuch.h | 2 ++ + 3 files changed, 13 insertions(+), 1 deletion(-) + +diff --git a/devel/STYLE b/devel/STYLE +index 92de42c..24bd548 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 42b6339..c033f34 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 20c4e01..6a69f31 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__ */ + + /** +-- +2.1.4 +