From 0f825b5a3e965979526abecfdd8747f1f1cc19a8 Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Tue, 3 Mar 2015 14:32:09 +0200 Subject: [PATCH] Re: [PATCH] go: add binding for notmuch_message_get_date --- b1/07f5113905402c10e2cc2274caeeaf0707ff9e | 84 +++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 b1/07f5113905402c10e2cc2274caeeaf0707ff9e diff --git a/b1/07f5113905402c10e2cc2274caeeaf0707ff9e b/b1/07f5113905402c10e2cc2274caeeaf0707ff9e new file mode 100644 index 000000000..0763f9ec3 --- /dev/null +++ b/b1/07f5113905402c10e2cc2274caeeaf0707ff9e @@ -0,0 +1,84 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 480D1431FAF + for ; Tue, 3 Mar 2015 04:34:43 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 2.438 +X-Spam-Level: ** +X-Spam-Status: No, score=2.438 tagged_above=-999 required=5 + tests=[DNS_FROM_AHBL_RHSBL=2.438] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id CdAnpnLuRiq8 for ; + Tue, 3 Mar 2015 04:34:40 -0800 (PST) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by olra.theworths.org (Postfix) with ESMTP id F3288431FAE + for ; Tue, 3 Mar 2015 04:34:39 -0800 (PST) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id C21391000E7; + Tue, 3 Mar 2015 14:32:09 +0200 (EET) +From: Tomi Ollila +To: Trevor Jim , notmuch@notmuchmail.org +Subject: Re: [PATCH] go: add binding for notmuch_message_get_date +In-Reply-To: +References: +User-Agent: Notmuch/0.19+53~gb45d2f9 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Tue, 03 Mar 2015 12:34:43 -0000 + +On Mon, Mar 02 2015, Trevor Jim 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 -- 2.26.2