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 68CF942116A
\r
6 for <notmuch@notmuchmail.org>; Mon, 30 Apr 2012 09:26:17 -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 Zq-YjRGlR9BT for <notmuch@notmuchmail.org>;
\r
16 Mon, 30 Apr 2012 09:26:15 -0700 (PDT)
\r
17 Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id D2B8D429E54
\r
20 for <notmuch@notmuchmail.org>; Mon, 30 Apr 2012 09:25:49 -0700 (PDT)
\r
21 X-AuditID: 1209190e-b7fd86d0000008b4-32-4f9ebd0d2659
\r
22 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])
\r
23 by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id AE.BC.02228.D0DBE9F4; Mon, 30 Apr 2012 12:25:49 -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 q3UGPnwr022299;
\r
27 Mon, 30 Apr 2012 12:25:49 -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 q3UGPhSh005260
\r
33 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
34 Mon, 30 Apr 2012 12:25:48 -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 1SOtPy-0006HG-4V; Mon, 30 Apr 2012 12:25:42 -0400
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: notmuch@notmuchmail.org
\r
40 Subject: [PATCH v2 5/6] ruby: Update Ruby bindings for new
\r
41 notmuch_database_{open, create} signatures
\r
42 Date: Mon, 30 Apr 2012 12:25:37 -0400
\r
43 Message-Id: <1335803138-24024-6-git-send-email-amdragon@mit.edu>
\r
44 X-Mailer: git-send-email 1.7.9.1
\r
45 In-Reply-To: <1335803138-24024-1-git-send-email-amdragon@mit.edu>
\r
46 References: <1335651473-19652-1-git-send-email-amdragon@mit.edu>
\r
47 <1335803138-24024-1-git-send-email-amdragon@mit.edu>
\r
48 X-Brightmail-Tracker:
\r
49 H4sIAAAAAAAAA+NgFtrMIsWRmVeSWpSXmKPExsUixCmqrMu7d56/weOdQhbXb85kdmD0eLbq
\r
50 FnMAYxSXTUpqTmZZapG+XQJXxo0H21gKGjkrThzazdLA2MfexcjJISFgInFz0WEmCFtM4sK9
\r
51 9WxdjFwcQgL7GCVuzb3ADuFsYJRouv6BGcK5zyRxfd8EqLL5jBINbZvYQPrZBDQktu1fzghi
\r
52 iwhIS+y8O5u1i5GDg1lATeJPlwpIWFggReLc5ydgq1kEVCVmTfwHZvMKOEi8OtMNdZKCxLN1
\r
53 x8FO4hRwlLh14BsLiC0kUC6x8cInxgmM/AsYGVYxyqbkVunmJmbmFKcm6xYnJ+blpRbpGuvl
\r
54 ZpbopaaUbmIEh40k3w7GrweVDjEKcDAq8fC+WjjPX4g1say4MvcQoyQHk5Ior+4eoBBfUn5K
\r
55 ZUZicUZ8UWlOavEhRgkOZiUR3tKJQDnelMTKqtSifJiUNAeLkjivmtY7PyGB9MSS1OzU1ILU
\r
56 IpisDAeHkgTvRpChgkWp6akVaZk5JQhpJg5OkOE8QMPtQWp4iwsSc4sz0yHypxgVpcR5p4Ak
\r
57 BEASGaV5cL2wuH7FKA70ijCvBEgVDzAlwHW/AhrMBDQ43xxscEkiQkqqgbGh9qHRsqrNXU5u
\r
58 LHWea8pLew9NEHDRzOC94ljyfN2jHM5w5dCTOiU1B4PL9lVyb33gMWvH+e+7O5T52ljm1ri2
\r
59 v93wv+PqOqaAnPm6JxjvGMXu8l1wXUvZPcd3KsdNUVfVeUoJNX4NCxgvXG157CQRNOufycIy
\r
60 6xkvljV4/94jbtaw2TNFTImlOCPRUIu5qDgRAEmPrdTGAgAA
\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: Mon, 30 Apr 2012 16:26:18 -0000
\r
76 bindings/ruby/database.c | 12 +++++++++---
\r
77 1 files changed, 9 insertions(+), 3 deletions(-)
\r
79 diff --git a/bindings/ruby/database.c b/bindings/ruby/database.c
\r
80 index ba9a139..409d54f 100644
\r
81 --- a/bindings/ruby/database.c
\r
82 +++ b/bindings/ruby/database.c
\r
83 @@ -42,6 +42,8 @@ notmuch_rb_database_initialize (int argc, VALUE *argv, VALUE self)
\r
87 + notmuch_database_t *database;
\r
88 + notmuch_status_t ret;
\r
90 /* Check arguments */
\r
91 rb_scan_args (argc, argv, "11", &pathv, &hashv);
\r
92 @@ -73,9 +75,13 @@ notmuch_rb_database_initialize (int argc, VALUE *argv, VALUE self)
\r
95 Check_Type (self, T_DATA);
\r
96 - DATA_PTR (self) = create ? notmuch_database_create (path) : notmuch_database_open (path, mode);
\r
97 - if (!DATA_PTR (self))
\r
98 - rb_raise (notmuch_rb_eDatabaseError, "Failed to open database");
\r
100 + ret = notmuch_database_create (path, &database);
\r
102 + ret = notmuch_database_open (path, mode, &database);
\r
103 + notmuch_rb_status_raise (ret);
\r
105 + DATA_PTR (self) = database;
\r