[PATCH 2/2] lib: introduce notmuch_database_new for initializing a database handle
David Bremner
david at tethera.net
Wed Jan 15 06:19:32 PST 2014
David Bremner <david at tethera.net> writes:
> I'm not sure if this is also a dead end, but I was trying to sketch out
> an api that returned something more detailed as status and came up with
> the following. The general idea is to replace notmuch_status_t with a
> pointer to struct. This will require pretty noisy source changes,
> unless we're comfortable with using NULL pointer to indicate success.
> In either case we'd rename the existing enum to something like
> notmuch_status_code_t.
>
> /* pseudo-C follows */
>
> typedef struct notmuch_status_struct * notmuch_status_t;
>
A less API disruptive change would be to continue returning codes, but
provide functions to interrogate the main types (database, message, etc)
for "last-error". We'd still need to special case database_(open|create)
d
More information about the notmuch
mailing list