Re: [PATCH 2/2] lib: thread-safe s-expression query parser

Subject: Re: [PATCH 2/2] lib: thread-safe s-expression query parser

Date: Sat, 22 Jul 2023 16:06:22 -0300

To: Kevin Boulain, notmuch@notmuchmail.org

Cc: Kevin Boulain

From: David Bremner


Kevin Boulain <kevin@boula.in> writes:

> +
> +inline Xapian::Query
> +_sexp_initial_query (_sexp_initial_t initial)

My first thought was that this should be static, but maybe it doesn't
matter in C++; I see the other inline functions in that file are not
declared static.

> +    }
> +    assert (! "unreachable");

I stumbled over the logic this code. I would prefer not to use assert
for this. In a few other places we call INTERNAL_ERROR from a default:
case.

Other than those quibbles, the change looks reasonable. I'm unsure how
to test it though.
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: