unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: Jani Nikula <jani@nikula.org>, Austin Clements <amdragon@MIT.EDU>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH 2/2] lib: introduce notmuch_database_new for initializing a database handle
Date: Wed, 15 Jan 2014 10:19:32 -0400	[thread overview]
Message-ID: <87r489iayz.fsf@zancas.localnet> (raw)
In-Reply-To: <87a9eyk8ap.fsf@zancas.localnet>

David Bremner <david@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

      reply	other threads:[~2014-01-15 14:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-01 13:13 [PATCH 0/2] lib: introduce notmuch_database_new Jani Nikula
2013-12-01 13:13 ` [PATCH 1/2] lib: add return status to database close and destroy Jani Nikula
2013-12-04 16:31   ` Austin Clements
2013-12-04 18:40     ` Jani Nikula
2013-12-01 13:14 ` [PATCH 2/2] lib: introduce notmuch_database_new for initializing a database handle Jani Nikula
2013-12-03 11:47   ` David Bremner
2013-12-03 14:11     ` Tomi Ollila
2013-12-03 17:29       ` Jani Nikula
2013-12-03 19:35         ` Tomi Ollila
2013-12-03 17:22     ` Jani Nikula
2013-12-04 23:11   ` Austin Clements
2013-12-05 18:17     ` Jani Nikula
2014-01-14 13:22       ` David Bremner
2014-01-15 14:19         ` David Bremner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r489iayz.fsf@zancas.localnet \
    --to=david@tethera.net \
    --cc=amdragon@MIT.EDU \
    --cc=jani@nikula.org \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).