From: Trevor Jim <tjim@mac.com>
To: notmuch@notmuchmail.org
Subject: [PATCH] go: add binding for notmuch_message_get_date
Date: Mon, 02 Mar 2015 15:39:17 -0500 [thread overview]
Message-ID: <m2fv9np216.fsf@att.com> (raw)
---
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
+ }
+ timestamp := C.notmuch_message_get_date(self.message)
+ return int64(timestamp)
+}
/* Get the value of the specified header from 'message'.
*
--
2.2.2
next reply other threads:[~2015-03-02 21:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-02 20:39 Trevor Jim [this message]
2015-03-03 12:32 ` [PATCH] go: add binding for notmuch_message_get_date Tomi Ollila
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=m2fv9np216.fsf@att.com \
--to=tjim@mac.com \
--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).