1 Return-Path: <amthrax@drake.mit.edu>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 652F5431FB6
\r
6 for <notmuch@notmuchmail.org>; Sun, 13 May 2012 12:57:23 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id 0wbQhxGUu9uh for <notmuch@notmuchmail.org>;
\r
16 Sun, 13 May 2012 12:57:22 -0700 (PDT)
\r
17 Received: from dmz-mailsec-scanner-2.mit.edu (DMZ-MAILSEC-SCANNER-2.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id 8B3A0431FAE
\r
20 for <notmuch@notmuchmail.org>; Sun, 13 May 2012 12:57:22 -0700 (PDT)
\r
21 X-AuditID: 1209190d-b7fbf6d0000008ba-a0-4fb012214999
\r
22 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])
\r
23 by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id DA.C9.02234.12210BF4; Sun, 13 May 2012 15:57:21 -0400 (EDT)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q4DJvKdr007436;
\r
27 Sun, 13 May 2012 15:57:20 -0400
\r
28 Received: from drake.mit.edu
\r
29 (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com
\r
30 [209.6.116.242]) (authenticated bits=0)
\r
31 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
32 by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q4DJvFSY022909
\r
33 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
34 Sun, 13 May 2012 15:57:16 -0400 (EDT)
\r
35 Received: from amthrax by drake.mit.edu with local (Exim 4.77)
\r
36 (envelope-from <amthrax@drake.mit.edu>)
\r
37 id 1STeup-0003eq-Pl; Sun, 13 May 2012 15:57:15 -0400
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: notmuch@notmuchmail.org
\r
40 Subject: [PATCH 2/5] go: Update for changes to notmuch_database_get_directory
\r
41 Date: Sun, 13 May 2012 15:57:06 -0400
\r
42 Message-Id: <1336939029-13969-3-git-send-email-amdragon@mit.edu>
\r
43 X-Mailer: git-send-email 1.7.10
\r
44 In-Reply-To: <1336939029-13969-1-git-send-email-amdragon@mit.edu>
\r
45 References: <1336939029-13969-1-git-send-email-amdragon@mit.edu>
\r
46 X-Brightmail-Tracker:
\r
47 H4sIAAAAAAAAA+NgFrrNIsWRmVeSWpSXmKPExsUixCmqrKsotMHfYM8zI4vZrT+YLG60djNa
\r
48 NE13trh+cyazxZuV81gdWD0Of13I4jHx/Gk2j1v3X7N7PFt1i9ljy6H3zAGsUVw2Kak5mWWp
\r
49 Rfp2CVwZs99PYS74wFcxc9Ej9gbGTTxdjJwcEgImEkt2TGCDsMUkLtxbD2RzcQgJ7GOU+Hl0
\r
50 FguEs4FR4u7bG0wQzn0miR1nf0GVzWeU+P5iLStIP5uAhsS2/csZQWwRAWmJnXdns4IUMQt0
\r
51 MUr8ftPMDJIQFvCVuLXlCFARBweLgKrEyfZkkDCvgIPE2r5z7BB3yEs8vd8HdhOngKPEsisL
\r
52 wVqFgGpOfvzLPIGRfwEjwypG2ZTcKt3cxMyc4tRk3eLkxLy81CJdI73czBK91JTSTYzgMJTk
\r
53 3cH47qDSIUYBDkYlHt4Fouv9hVgTy4orcw8xSnIwKYnypglu8BfiS8pPqcxILM6ILyrNSS0+
\r
54 xCjBwawkwrv+IVA5b0piZVVqUT5MSpqDRUmcV1XrnZ+QQHpiSWp2ampBahFMVoaDQ0mCNxdk
\r
55 qGBRanpqRVpmTglCmomDE2Q4D9DwFJAa3uKCxNzizHSI/ClGRSlxiGYBkERGaR5cLyxNvGIU
\r
56 B3pFmNcVpIoHmGLgul8BDWYCGswvsA5kcEkiQkqqgdF22f3NpXcOXXnwZaaI5PvyiN437up2
\r
57 /o4dP7ct83gVY6pf+J27R7cyVELn9Z4Pdz8ExJuqP1u62c2r4NrJJIFu8/xld85XOUQlXvbV
\r
58 Tn62YtX+rTu8s7f94j8RFOWWesOYZZKXtnxoUpaT20tRt+Z8i8zcqZGauzbkvDOOWGdn9m+r
\r
59 8JrTvEosxRmJhlrMRcWJAKvubZ/uAgAA
\r
60 Cc: tomi.ollila@iki.fi
\r
61 X-BeenThere: notmuch@notmuchmail.org
\r
62 X-Mailman-Version: 2.1.13
\r
64 List-Id: "Use and development of the notmuch mail system."
\r
65 <notmuch.notmuchmail.org>
\r
66 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
67 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
68 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
69 List-Post: <mailto:notmuch@notmuchmail.org>
\r
70 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
71 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
72 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
73 X-List-Received-Date: Sun, 13 May 2012 19:57:23 -0000
\r
76 bindings/go/src/notmuch/notmuch.go | 13 +++++++------
\r
77 bindings/python/notmuch/database.py | 4 ++--
\r
78 2 files changed, 9 insertions(+), 8 deletions(-)
\r
80 diff --git a/bindings/go/src/notmuch/notmuch.go b/bindings/go/src/notmuch/notmuch.go
\r
81 index 12de4c8..00bd53a 100644
\r
82 --- a/bindings/go/src/notmuch/notmuch.go
\r
83 +++ b/bindings/go/src/notmuch/notmuch.go
\r
84 @@ -191,19 +191,20 @@ func (self *Database) NeedsUpgrade() bool {
\r
86 * Can return NULL if a Xapian exception occurs.
\r
88 -func (self *Database) GetDirectory(path string) *Directory {
\r
89 +func (self *Database) GetDirectory(path string) (*Directory, Status) {
\r
90 var c_path *C.char = C.CString(path)
\r
91 defer C.free(unsafe.Pointer(c_path))
\r
95 + return nil, STATUS_OUT_OF_MEMORY
\r
98 - c_dir := C.notmuch_database_get_directory(self.db, c_path)
\r
101 + var c_dir *C.notmuch_directory_t
\r
102 + st := Status(C.notmuch_database_get_directory(self.db, c_path, &c_dir))
\r
103 + if st != STATUS_SUCCESS || c_dir == nil {
\r
106 - return &Directory{dir: c_dir}
\r
107 + return &Directory{dir: c_dir}, st
\r
110 /* Add a new message to the given notmuch database.
\r
111 diff --git a/bindings/python/notmuch/database.py b/bindings/python/notmuch/database.py
\r
112 index 1b1ddc3..0a58dd0 100644
\r
113 --- a/bindings/python/notmuch/database.py
\r
114 +++ b/bindings/python/notmuch/database.py
\r
115 @@ -73,8 +73,8 @@ class Database(object):
\r
117 """notmuch_database_get_directory"""
\r
118 _get_directory = nmlib.notmuch_database_get_directory
\r
119 - _get_directory.argtypes = [NotmuchDatabaseP, c_char_p]
\r
120 - _get_directory.restype = NotmuchDirectoryP
\r
121 + _get_directory.argtypes = [NotmuchDatabaseP, c_char_p, POINTER(NotmuchDirectoryP)]
\r
122 + _get_directory.restype = c_uint
\r
124 """notmuch_database_get_path"""
\r
125 _get_path = nmlib.notmuch_database_get_path
\r