Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / e4 / a1a92628d6636c3d132f32938e56b2245abd14
1 Return-Path: <amdragon@gmail.com>\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 38FBE431FD0\r
6         for <notmuch@notmuchmail.org>; Sun, 19 Jun 2011 16:51:14 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.699\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001,\r
13         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id 4a3j476znMrb for <notmuch@notmuchmail.org>;\r
17         Sun, 19 Jun 2011 16:51:13 -0700 (PDT)\r
18 Received: from mail-qw0-f53.google.com (mail-qw0-f53.google.com\r
19         [209.85.216.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 8B18B431FB6\r
22         for <notmuch@notmuchmail.org>; Sun, 19 Jun 2011 16:51:13 -0700 (PDT)\r
23 Received: by qwb7 with SMTP id 7so1267190qwb.26\r
24         for <notmuch@notmuchmail.org>; Sun, 19 Jun 2011 16:51:12 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
26         h=domainkey-signature:mime-version:sender:in-reply-to:references:date\r
27         :x-google-sender-auth:message-id:subject:from:to:cc:content-type\r
28         :content-transfer-encoding;\r
29         bh=j+YfXaIeM4Xt13+Z+HAbXY4MCvXq1YTpqC866rVrfSo=;\r
30         b=DwnOhB9WG6dYyuNXjeFJZ736QPc9QgutjN0X+55FVgD4Zkk5KBqd0hLjlH7LgwsYrJ\r
31         4zNs1hMSFsOpRkavROMRHEj6bTqrbW0fMFYCMeiOtLV4POk+SDzBf2VXWGncZZAJJSLW\r
32         9TDNnu2EKpTui1S/lFCJe2nDyPOTvwm/1GE9I=\r
33 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
34         h=mime-version:sender:in-reply-to:references:date\r
35         :x-google-sender-auth:message-id:subject:from:to:cc:content-type\r
36         :content-transfer-encoding;\r
37         b=CTfm2nwMrQnI76gKULBwFIoKOG7uWfu+KsvlCQKmYIWo3qwP4m96DT4bgHf3PMiFS5\r
38         b9L/6J4cVMV7tvdaGDUHhI7PL6XONRzj9qOzMSkfU59nVKj1Ke4yVdBLz3B+8XKRw//O\r
39         1ANdKiRV9VozRfKWDXIgPsRWfSiAguQnio/BM=\r
40 MIME-Version: 1.0\r
41 Received: by 10.229.41.70 with SMTP id n6mr3426610qce.252.1308527471252; Sun,\r
42         19 Jun 2011 16:51:11 -0700 (PDT)\r
43 Sender: amdragon@gmail.com\r
44 Received: by 10.229.32.197 with HTTP; Sun, 19 Jun 2011 16:51:11 -0700 (PDT)\r
45 In-Reply-To: <87hb7m5f4s.fsf@gmail.com>\r
46 References: <20110616215439.GA26997@brick> <87boxxq833.fsf@SSpaeth.de>\r
47         <20110617161024.GA8154@optimusprime> <87hb7n300m.fsf@SSpaeth.de>\r
48         <87hb7m5f4s.fsf@gmail.com>\r
49 Date: Sun, 19 Jun 2011 19:51:11 -0400\r
50 X-Google-Sender-Auth: 7Dp9V-uz1wfhrvxewHJ7fJ-m7Og\r
51 Message-ID: <BANLkTik8ged+SoUQf5=x0m-CDC6rAKUoWQ@mail.gmail.com>\r
52 Subject: Re: [python] segfaults at Message.get_date\r
53 From: Austin Clements <amdragon@mit.edu>\r
54 To: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>\r
55 Content-Type: text/plain; charset=ISO-8859-1\r
56 Content-Transfer-Encoding: quoted-printable\r
57 Cc: Patrick Totzke <patricktotzke@googlemail.com>, notmuch@notmuchmail.org\r
58 X-BeenThere: notmuch@notmuchmail.org\r
59 X-Mailman-Version: 2.1.13\r
60 Precedence: list\r
61 List-Id: "Use and development of the notmuch mail system."\r
62         <notmuch.notmuchmail.org>\r
63 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
64         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
65 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
66 List-Post: <mailto:notmuch@notmuchmail.org>\r
67 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
68 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
69         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
70 X-List-Received-Date: Sun, 19 Jun 2011 23:51:14 -0000\r
71 \r
72 On Sun, Jun 19, 2011 at 5:45 AM, Dmitry Kurochkin\r
73 <dmitry.kurochkin@gmail.com> wrote:\r
74 > Hi Sebastian, Patrick.\r
75 >\r
76 > On Sat, 18 Jun 2011 12:30:01 +0200, Sebastian Spaeth <Sebastian@SSpaeth.d=\r
77 e> wrote:\r
78 >> On Fri, 17 Jun 2011 17:10:24 +0100, Patrick Totzke :\r
79 >> > #0 =A00x006eb87d in Xapian::Document::Internal::get_value(unsigned int=\r
80 ) const () from /usr/lib/sse2/libxapian.so.22\r
81 >> > #1 =A00x006eb952 in Xapian::Document::get_value(unsigned int) const ()=\r
82  from /usr/lib/sse2/libxapian.so.22\r
83 >> > #2 =A00x00523963 in notmuch_message_get_date () from /usr/local/lib/li=\r
84 bnotmuch.so.1\r
85 >>\r
86 >> One question, what type is libnotmuch really returning here? The code:\r
87 >>\r
88 >>\r
89 >> time_t\r
90 >> notmuch_message_get_date (notmuch_message_t *message)\r
91 >> { =A0 ...\r
92 >> =A0 =A0 return Xapian::sortable_unserialise (value);\r
93 >> }\r
94 >>\r
95 >> But Xapian API says that sortable_unserialise() returns floating type "d=\r
96 ouble"\r
97 >>\r
98 >> http://xapian.org/docs/apidoc/html/namespaceXapian.html#326fe2d6b0ee59ac=\r
99 9536f3960e8fd99b\r
100 >> "Convert a string encoded using sortable_serialise back to a floating\r
101 >> point number."\r
102 >>\r
103 >> But time_t is usually a (signed) long and not floating point. Obviously\r
104 >> things have worked just fine so far, but is libnotmuch really returning\r
105 >> the right type here? Sorry, I expose my total lack of basic C++ knowledg=\r
106 e\r
107 >> here...\r
108 >>\r
109 >\r
110 > Converting double to time_t does not look good. =A0Notmuch converts\r
111 > between time_t and double both when setting and getting the date. =A0I\r
112 > guess it should work good in most cases at least. =A0Perhaps Carl knows\r
113 > better that it is safe.\r
114 \r
115 A double will precisely represent integers up to 2^53, so this\r
116 conversion shouldn't be a problem until the year 285422109 or so.\r