unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: Trevor Jim <tjim@mac.com>, notmuch@notmuchmail.org
Subject: Re: [PATCH] go: add binding for notmuch_message_get_date
Date: Tue, 03 Mar 2015 14:32:09 +0200	[thread overview]
Message-ID: <m261aimfcm.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <m2fv9np216.fsf@att.com>

On Mon, Mar 02 2015, Trevor Jim <tjim@mac.com> wrote:

> ---
>  bindings/go/src/notmuch/notmuch.go | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/bindings/go/src/notmuch/notmuch.go b/bindings/go/src/notmuch/notmuch.go
> index b9230ad..f5fd54c 100644
> --- a/bindings/go/src/notmuch/notmuch.go
> +++ b/bindings/go/src/notmuch/notmuch.go
> @@ -801,7 +801,13 @@ func (self *Message) SetFlag(flag Flag, value bool) {
>  	C.notmuch_message_set_flag(self.message, C.notmuch_message_flag_t(flag), v)
>  }
>  
> -// TODO: wrap notmuch_message_get_date
> +func  (self *Message) GetDate() int64 {
> +	if self.message == nil {
> +		return -1

-1 is 1969-dec-31 23:59:59 UTC

Should we care -- and e.g. return status in separate return value ?

Tomi

> +	}
> +	timestamp := C.notmuch_message_get_date(self.message)
> +	return int64(timestamp)
> +}
>  
>  /* Get the value of the specified header from 'message'.
>   *
> -- 
> 2.2.2

  reply	other threads:[~2015-03-03 12:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-02 20:39 [PATCH] go: add binding for notmuch_message_get_date Trevor Jim
2015-03-03 12:32 ` Tomi Ollila [this message]
2015-03-03 14:10   ` David Bremner
2015-03-03 16:22     ` Trevor Jim
2015-03-06  7:20       ` David Bremner
2015-03-03 16:39   ` Trevor Jim

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=m261aimfcm.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=notmuch@notmuchmail.org \
    --cc=tjim@mac.com \
    /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).