[PATCH] go: add binding for notmuch_message_get_date
authorTrevor Jim <tjim@mac.com>
Mon, 2 Mar 2015 20:39:17 +0000 (15:39 +1900)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:48:13 +0000 (14:48 -0700)
ec/78c5b029231b5592552231209cf12e677f0770 [new file with mode: 0644]

diff --git a/ec/78c5b029231b5592552231209cf12e677f0770 b/ec/78c5b029231b5592552231209cf12e677f0770
new file mode 100644 (file)
index 0000000..5d27dc7
--- /dev/null
@@ -0,0 +1,88 @@
+Return-Path: <tjim@mac.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 5864A431FAF\r
+       for <notmuch@notmuchmail.org>; Mon,  2 Mar 2015 13:41:56 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 1.739\r
+X-Spam-Level: *\r
+X-Spam-Status: No, score=1.739 tagged_above=-999 required=5\r
+       tests=[DNS_FROM_AHBL_RHSBL=2.438, FREEMAIL_FROM=0.001,\r
+       RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id Pz5Tc2SKeDrC for <notmuch@notmuchmail.org>;\r
+       Mon,  2 Mar 2015 13:41:53 -0800 (PST)\r
+X-Greylist: delayed 3598 seconds by postgrey-1.32 at olra;\r
+       Mon, 02 Mar 2015 13:41:53 PST\r
+Received: from nk11p00mm-asmtp004.mac.com (nk11p00mm-asmtp004.mac.com\r
+       [17.158.161.3])\r
+       (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 2B24E431FAE\r
+       for <notmuch@notmuchmail.org>; Mon,  2 Mar 2015 13:41:53 -0800 (PST)\r
+Received: from localhost (aegis.CS.Princeton.EDU [128.112.139.195])\r
+       by nk11p00mm-asmtp004.mac.com\r
+       (Oracle Communications Messaging Server 7.0.5.35.0 64bit (built Dec 4\r
+       2014))\r
+       with ESMTPSA id <0NKL0059JQPH7V30@nk11p00mm-asmtp004.mac.com> for\r
+       notmuch@notmuchmail.org; Mon, 02 Mar 2015 20:39:19 +0000 (GMT)\r
+X-Proofpoint-Virus-Version: vendor=fsecure\r
+       engine=2.50.10432:5.13.68,1.0.33,0.0.0000\r
+       definitions=2015-03-02_03:2015-03-02, 2015-03-02,\r
+       1970-01-01 signatures=0\r
+X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0\r
+       suspectscore=3 phishscore=0 adultscore=0 bulkscore=0 classifier=spam\r
+       adjust=0\r
+       reason=mlx scancount=1 engine=7.0.1-1412110000\r
+       definitions=main-1503020212\r
+From: Trevor Jim <tjim@mac.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH] go: add binding for notmuch_message_get_date\r
+Date: Mon, 02 Mar 2015 15:39:17 -0500\r
+Message-id: <m2fv9np216.fsf@att.com>\r
+MIME-version: 1.0\r
+Content-type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 02 Mar 2015 21:41:56 -0000\r
+\r
+\r
+---\r
+ bindings/go/src/notmuch/notmuch.go | 8 +++++++-\r
+ 1 file changed, 7 insertions(+), 1 deletion(-)\r
+\r
+diff --git a/bindings/go/src/notmuch/notmuch.go b/bindings/go/src/notmuch/notmuch.go\r
+index b9230ad..f5fd54c 100644\r
+--- a/bindings/go/src/notmuch/notmuch.go\r
++++ b/bindings/go/src/notmuch/notmuch.go\r
+@@ -801,7 +801,13 @@ func (self *Message) SetFlag(flag Flag, value bool) {\r
+       C.notmuch_message_set_flag(self.message, C.notmuch_message_flag_t(flag), v)\r
+ }\r
\r
+-// TODO: wrap notmuch_message_get_date\r
++func  (self *Message) GetDate() int64 {\r
++      if self.message == nil {\r
++              return -1\r
++      }\r
++      timestamp := C.notmuch_message_get_date(self.message)\r
++      return int64(timestamp)\r
++}\r
\r
+ /* Get the value of the specified header from 'message'.\r
+  *\r
+-- \r
+2.2.2\r
+\r