From: Jani Nikula Date: Sat, 7 Mar 2015 16:52:48 +0000 (+0200) Subject: Re: [PATCH 1/2] lib: define DEPRECATED macro, document its use. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ad33f8ddef98f204936d18b4af04f8dc15d11181;p=notmuch-archives.git Re: [PATCH 1/2] lib: define DEPRECATED macro, document its use. --- diff --git a/84/5c4e34b9ec81f85b71f023ecb57fa7aabc6f5d b/84/5c4e34b9ec81f85b71f023ecb57fa7aabc6f5d new file mode 100644 index 000000000..64cff86c1 --- /dev/null +++ b/84/5c4e34b9ec81f85b71f023ecb57fa7aabc6f5d @@ -0,0 +1,136 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id A250B431FBC + for ; Sat, 7 Mar 2015 08:52:33 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 1.738 +X-Spam-Level: * +X-Spam-Status: No, score=1.738 tagged_above=-999 required=5 + tests=[DNS_FROM_AHBL_RHSBL=2.438, RCVD_IN_DNSWL_LOW=-0.7] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id rzr9WDn9thhd for ; + Sat, 7 Mar 2015 08:52:30 -0800 (PST) +Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com + [209.85.212.182]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 34C42431FAE + for ; Sat, 7 Mar 2015 08:52:30 -0800 (PST) +Received: by wiwl15 with SMTP id l15so10425168wiw.0 + for ; Sat, 07 Mar 2015 08:52:29 -0800 (PST) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:subject:in-reply-to:references + :user-agent:date:message-id:mime-version:content-type; + bh=A23WUMtuldzubV9z5XrSjHLPAWUBWUaHg5gUWi2WV+E=; + b=g+7bUXwUFf2T5dSaEmNRPI+9GzabDEVvzBGgwK2xZiKNcHOY8PcJGS1juhayrjUNEQ + mNy+wIPXmAyDjyNGmeqou0r/nmKAeLnvIE+iLvSCzJxZArtCVOVC3iiWwdis7lCpVL1D + FrH9IMB34KyyuoiXcoCISxirPZ63BmsxCh8fZa1H/JeTsVBUvyJ1xph5o+pelDeWoqve + mUerTKapwKOCxrWgYuO7J7CrYc1CYEU1YlrDbxVLFws2LQsmr7ewKisN/BRglsI+OgnM + 2LVZ+KSwUdxrHkzCja8O5YxjnuuuOGQQzsk2GFF94XdwEtc/nkzBC4WrR6xYg36/3YVA + k5kw== +X-Gm-Message-State: + ALoCoQlVm8EhjcEISK9XfIr8rM/bxRS4I+GifeFQ1b0mdlgYIEUKjBlwIYwT3M0EKzMyyyJQdiDR +X-Received: by 10.180.219.102 with SMTP id pn6mr43017026wic.50.1425747149213; + Sat, 07 Mar 2015 08:52:29 -0800 (PST) +Received: from localhost (mobile-internet-bcee3b-76.dhcp.inet.fi. + [188.238.59.76]) by mx.google.com with ESMTPSA id + a13sm20043420wjx.30.2015.03.07.08.52.28 + (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Sat, 07 Mar 2015 08:52:28 -0800 (PST) +From: Jani Nikula +To: David Bremner , notmuch@notmuchmail.org +Subject: Re: [PATCH 1/2] lib: define DEPRECATED macro, document its use. +In-Reply-To: <1425746508-16224-1-git-send-email-david@tethera.net> +References: <1425746508-16224-1-git-send-email-david@tethera.net> +User-Agent: Notmuch/0.19+74~g6aeef2e (http://notmuchmail.org) Emacs/24.4.1 + (x86_64-pc-linux-gnu) +Date: Sat, 07 Mar 2015 18:52:48 +0200 +Message-ID: <87k2ysiwbj.fsf@nikula.org> +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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: Sat, 07 Mar 2015 16:52:33 -0000 + +On Sat, 07 Mar 2015, David Bremner wrote: +> 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..fcd5e99 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 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: +> + +> + 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 3e326bf..5fb51ba 100644 +> --- a/lib/notmuch.h +> +++ b/lib/notmuch.h +> @@ -59,6 +59,8 @@ NOTMUCH_BEGIN_DECLS +> #define LIBNOTMUCH_MINOR_VERSION 1 +> #define LIBNOTMUCH_MICRO_VERSION 0 +> +> +#define DEPRECATED(major,minor) \ + +Is that perhaps a too generic name for a macro? NOTMUCH_DEPRECATED? + +Otherwise seems nice. Did not actually try it. + +BR, +Jani. + +> + __attribute__ ((deprecated ("function deprecated as of libnotmuch " #major "." #minor))) +> #endif /* __DOXYGEN__ */ +> +> /** +> -- +> 2.1.4 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch