Re: [RFC 2/5] lib: remove enum names from typedefs
On Wed, 13 Oct 2021, Tomi Ollila wrote: > On Wed, Oct 13 2021, David Bremner wrote: > >> Jani Nikula writes: >> >>> 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. >>> --- >> I guess that change would be fine independent of the rest? > > I had the same thought. Added more typedef enums outside of notmuch.h, removed hawkmoth references, and resent separately. BR, Jani. ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
Re: [RFC 2/5] lib: remove enum names from typedefs
On Wed, Oct 13 2021, David Bremner wrote: > Jani Nikula writes: > >> 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. >> --- > I guess that change would be fine independent of the rest? I had the same thought. Tomi ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
Re: [RFC 2/5] lib: remove enum names from typedefs
Jani Nikula writes: > 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. > --- I guess that change would be fine independent of the rest? ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
[RFC 2/5] lib: remove enum names from typedefs
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 ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org