unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Jani Nikula <jani@nikula.org>
To: notmuch@notmuchmail.org
Cc: jani@nikula.org
Subject: [RFC 2/5] lib: remove enum names from typedefs
Date: Tue, 12 Oct 2021 21:51:24 +0300	[thread overview]
Message-ID: <20211012185127.198348-3-jani@nikula.org> (raw)
In-Reply-To: <20211012185127.198348-1-jani@nikula.org>

Given the named enum typedef:

    typedef enum _name_t { ... } name_t;

Hawkmoth uses _name_t as the name for documentation. Typedef the
anonymous enum:

    typedef enum { ... } name_t;

instead to use name_t. We don't really need the enum names for
anything, and not all of the enum typedefs have them anyway.
---
 lib/notmuch.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/notmuch.h b/lib/notmuch.h
index 546643e80cbb..ca5878a949bc 100644
--- a/lib/notmuch.h
+++ b/lib/notmuch.h
@@ -112,7 +112,7 @@ typedef int notmuch_bool_t;
  * A zero value (NOTMUCH_STATUS_SUCCESS) indicates that the function
  * completed without error. Any other value indicates an error.
  */
-typedef enum _notmuch_status {
+typedef enum {
     /**
      * No error occurred.
      */
@@ -1678,7 +1678,7 @@ notmuch_message_reindex (notmuch_message_t *message,
 /**
  * Message flags.
  */
-typedef enum _notmuch_message_flag {
+typedef enum {
     NOTMUCH_MESSAGE_FLAG_MATCH,
     NOTMUCH_MESSAGE_FLAG_EXCLUDED,
 
@@ -2524,7 +2524,7 @@ notmuch_config_list_destroy (notmuch_config_list_t *config_list);
 /**
  * Configuration keys known to libnotmuch
  */
-typedef enum _notmuch_config_key {
+typedef enum {
     NOTMUCH_CONFIG_FIRST,
     NOTMUCH_CONFIG_DATABASE_PATH = NOTMUCH_CONFIG_FIRST,
     NOTMUCH_CONFIG_MAIL_ROOT,
-- 
2.30.2

  parent reply	other threads:[~2021-10-12 18:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-12 18:51 [RFC 0/5] doc: api docs overhaul Jani Nikula
2021-10-12 18:51 ` [RFC 1/5] doc: replace doxygen with hawkmoth sphinx extension for api docs Jani Nikula
2021-10-13  6:26   ` Tomi Ollila
2021-10-13  9:02     ` Jani Nikula
2021-10-13 13:21   ` David Bremner
2021-10-12 18:51 ` Jani Nikula [this message]
2021-10-13 13:18   ` [RFC 2/5] lib: remove enum names from typedefs David Bremner
2021-10-13 13:28     ` Tomi Ollila
2021-10-13 14:04       ` Jani Nikula
2021-10-12 18:51 ` [RFC 3/5] lib: remove commented out NOTMUCH_DEPRECATED() Jani Nikula
2021-10-13 13:19   ` David Bremner
2021-10-13 14:04     ` Jani Nikula
2021-10-12 18:51 ` [RFC 4/5] lib: remove #ifndef __DOXYGEN__ conditions Jani Nikula
2021-10-12 18:51 ` [RFC 5/5] lib: documentation comment overhaul for hawkmoth Jani Nikula
2021-10-13 12:17 ` [RFC 0/5] doc: api docs overhaul David Bremner
2021-10-13 13:41   ` Jani Nikula
2021-10-13 13:59     ` David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211012185127.198348-3-jani@nikula.org \
    --to=jani@nikula.org \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).