Re: [PATCH 2/4] lib: catch error from closed db in n_m_get_message_id

Subject: Re: [PATCH 2/4] lib: catch error from closed db in n_m_get_message_id

Date: Sun, 05 Jul 2020 08:17:28 -0300

To: Floris Bruynooghe, notmuch@notmuchmail.org

Cc:

From: David Bremner


David Bremner <david@tethera.net> writes:

> Floris Bruynooghe <flub@devork.be> writes:
>
>> notmuch_database_get_version currently returns and unsigned int and
>> segfaults on use with a closed db.
>
> Yes, the ones without a proper status value are going to be a bit work.
>
> In the next series I just posted [1], I started providing status value
> returning version (see notmuch_message_get_flag_st). We've been through
> a few of these migrations and it has not been too painful.
>

I thought of another variation for the boolean valued functions. We
could embed the boolean values in the notmuch_status_t value by adding
one or more new status values corresponding to TRUE and FALSE. I'm not
sure if that would be much simpler, but it would avoid the use of output
parameters.
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: