[PATCH 06/11] lib: Internal support for querying and creating ghost messages
Austin Clements
aclements at csail.mit.edu
Sun Oct 5 16:24:00 PDT 2014
Quoth David Bremner on Oct 05 at 10:30 am:
> Austin Clements <aclements at csail.mit.edu> writes:
>
> > + message->flags &= ~(1 << NOTMUCH_MESSAGE_FLAG_GHOST);
>
> What do you think about using bit set / clear / read macros? I don't
> insist, but I wonder if it would make this part more readable.
I'm used to reading this stuff, so either way is fine with me. Do we
have bit set / clear / read macros?
> > + else if (*i == "Tghost")
> > + message->flags |= (1 << NOTMUCH_MESSAGE_FLAG_GHOST);
> > + else
>
> It makes me faintly unhappy to have the prefix hardcoded here.
> Not sure if there is a sensible solution.
I agree, but I also don't want to construct the test string every time
or deconstruct the term string every time. I could move the "T"
prefix string to a #define and use that both here and in
BOOLEAN_PREFIX_INTERNAL, but that solution may be worse than the
problem. What do you think?
More information about the notmuch
mailing list