unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Patrick Totzke <patricktotzke@gmail.com>
To: David Bremner <david@tethera.net>
Cc: "notmuch@notmuchmail.org" <notmuch@notmuchmail.org>
Subject: Re: [PATCH] use notmuch_database_open_verbose
Date: Sun, 13 Mar 2016 12:03:20 +0000	[thread overview]
Message-ID: <CAM7JpKkXciAooWMaQ+uuWxTAs_O6DAr0-u-n+uTy2c1w-tkm3g@mail.gmail.com> (raw)
In-Reply-To: <87oaaj64gh.fsf@zancas.localnet>

[-- Attachment #1: Type: text/plain, Size: 1252 bytes --]

As far as I understand the bindings, the returned message is not needed
because the return
value of `Database._open` (line 212) contains information about the type of
error that occurred.
This is passed on two lines below if the open-call was unsuccessful.

The docstrings for this method are not ideal (the mentioned "status"
parameter is actually called "mode") but in terms of functionality it seems
ok.

On 12 March 2016 at 16:33, David Bremner <david@tethera.net> wrote:

> David Bremner <david@tethera.net> writes:
>
> >> -    """notmuch_database_open"""
> >> -    _open = nmlib.notmuch_database_open
> >> +    """notmuch_database_open_verbose"""
> >> +    _open = nmlib.notmuch_database_open_verbose
> >>      _open.argtypes = [c_char_p, c_uint, POINTER(NotmuchDatabaseP)]
> >>      _open.restype = c_uint
> >
> > I expect you probably want to add the new binding, rather than replacing
> > the old one. Otherwise updating the bindings will break all bindings
> > using scripts.
>
> Oh silly me. That's not actually exposed to the python API, so that's
> fine. On the other hand, don't you want to update the argument types and
> do something useful (throw an exception?) with the returned message?  As
> it stands you lose information.
>
> d
>

[-- Attachment #2: Type: text/html, Size: 1932 bytes --]

  reply	other threads:[~2016-03-13 12:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-12 15:17 [PATCH] use notmuch_database_open_verbose Patrick Totzke
2016-03-12 16:26 ` David Bremner
2016-03-12 16:33   ` David Bremner
2016-03-13 12:03     ` Patrick Totzke [this message]
     [not found]     ` <CAM7JpKmVzZYZ8bpjc5qzWvBedKx4GT-y+EKWS1KQgZJ_LamKNw@mail.gmail.com>
2016-03-13 12:37       ` David Bremner

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=CAM7JpKkXciAooWMaQ+uuWxTAs_O6DAr0-u-n+uTy2c1w-tkm3g@mail.gmail.com \
    --to=patricktotzke@gmail.com \
    --cc=david@tethera.net \
    --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).