1 Return-Path: <amdragon@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 A2FB4431FCF
\r
6 for <notmuch@notmuchmail.org>; Sat, 24 Nov 2012 20:57:30 -0800 (PST)
\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 m-IGL6SD6IUe for <notmuch@notmuchmail.org>;
\r
16 Sat, 24 Nov 2012 20:57:29 -0800 (PST)
\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 1C2C1431FCB
\r
20 for <notmuch@notmuchmail.org>; Sat, 24 Nov 2012 20:57:27 -0800 (PST)
\r
21 X-AuditID: 1209190e-b7f756d000000904-91-50b1a537fe1d
\r
22 Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])
\r
23 by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id 2E.69.02308.735A1B05; Sat, 24 Nov 2012 23:57:27 -0500 (EST)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id qAP4vG0X012785;
\r
27 Sat, 24 Nov 2012 23:57:16 -0500
\r
28 Received: from drake.dyndns.org
\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 qAP4vEva000083
\r
33 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
34 Sat, 24 Nov 2012 23:57:16 -0500 (EST)
\r
35 Received: from amthrax by drake.dyndns.org with local (Exim 4.77)
\r
36 (envelope-from <amdragon@mit.edu>)
\r
37 id 1TcUHJ-0003Zp-U0; Sat, 24 Nov 2012 23:57:13 -0500
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: notmuch@notmuchmail.org
\r
40 Subject: [PATCH 3/6] lib: Eliminate _notmuch_message_list_append
\r
41 Date: Sat, 24 Nov 2012 23:57:04 -0500
\r
42 Message-Id: <1353819427-13182-4-git-send-email-amdragon@mit.edu>
\r
43 X-Mailer: git-send-email 1.7.10.4
\r
44 In-Reply-To: <1353819427-13182-1-git-send-email-amdragon@mit.edu>
\r
45 References: <1353819427-13182-1-git-send-email-amdragon@mit.edu>
\r
46 X-Brightmail-Tracker:
\r
47 H4sIAAAAAAAAA+NgFtrNIsWRmVeSWpSXmKPExsUixG6nrmu+dGOAweceNYvVc3ksrt+cyezA
\r
48 5LFz1l12j2erbjEHMEVx2aSk5mSWpRbp2yVwZez/+oSxYAtvxbqVfUwNjA+5uhg5OSQETCRu
\r
49 t6xigrDFJC7cW8/WxcjFISSwj1FiyZ31jCAJIYENjBInvwRDJB4xSTTc2cUM4cxllNiweQYr
\r
50 SBWbgIbEtv3LwTpEBKQldt6dDRZnFnCU+Lx/ERuILSzgILFi5hVmEJtFQFXi8Nxd7CA2L1B8
\r
51 /d8PrBBnKEp0P5sAVM/BwQnU27hXDuIIB4lb/yYxT2DkX8DIsIpRNiW3Sjc3MTOnODVZtzg5
\r
52 MS8vtUjXWC83s0QvNaV0EyMojDgl+XYwfj2odIhRgINRiYf3RuLGACHWxLLiytxDjJIcTEqi
\r
53 vJmLgEJ8SfkplRmJxRnxRaU5qcWHGCU4mJVEeK1VgXK8KYmVValF+TApaQ4WJXHeKyk3/YUE
\r
54 0hNLUrNTUwtSi2CyMhwcShK8IkuAGgWLUtNTK9Iyc0oQ0kwcnCDDeYCGi4LU8BYXJOYWZ6ZD
\r
55 5E8xKkqJ835eDJQQAElklObB9cLi/BWjONArwrxMIO08wBQB1/0KaDAT0OCns9eBDC5JREhJ
\r
56 NTAyaL2QeSYb6HCU0+T/0TO/d7anH3Db/bdONEtW/+HeuQU3lsmlNW3hu5Z0+82Kc5zTzh38
\r
57 l+B15zfXzLuqDdNfxV9s7lOYIxtVL+6y/abYh+2T7zIfvy9nk//K+2ZehKzaMa2O+QGK7zwW
\r
58 L6uYd+7Lzjgrj0Ttxc6/Hh+Kub1O7YRLk0yYy6sVSizFGYmGWsxFxYkAxeozpM4CAAA=
\r
59 X-BeenThere: notmuch@notmuchmail.org
\r
60 X-Mailman-Version: 2.1.13
\r
62 List-Id: "Use and development of the notmuch mail system."
\r
63 <notmuch.notmuchmail.org>
\r
64 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
65 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
66 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
67 List-Post: <mailto:notmuch@notmuchmail.org>
\r
68 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
69 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
70 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
71 X-List-Received-Date: Sun, 25 Nov 2012 04:57:31 -0000
\r
73 This API invited micro-optimized and complicated list pointer
\r
74 manipulation and is no longer used.
\r
76 lib/messages.c | 17 +++--------------
\r
77 lib/notmuch-private.h | 4 ----
\r
78 2 files changed, 3 insertions(+), 18 deletions(-)
\r
80 diff --git a/lib/messages.c b/lib/messages.c
\r
81 index 1121864..0eee569 100644
\r
82 --- a/lib/messages.c
\r
83 +++ b/lib/messages.c
\r
84 @@ -42,19 +42,7 @@ _notmuch_message_list_create (const void *ctx)
\r
88 -/* Append a single 'node' to the end of 'list'.
\r
91 -_notmuch_message_list_append (notmuch_message_list_t *list,
\r
92 - notmuch_message_node_t *node)
\r
94 - *(list->tail) = node;
\r
95 - list->tail = &node->next;
\r
98 -/* Allocate a new node for 'message' and append it to the end of
\r
101 +/* Append 'message' to the end of 'list'. */
\r
103 _notmuch_message_list_add_message (notmuch_message_list_t *list,
\r
104 notmuch_message_t *message)
\r
105 @@ -64,7 +52,8 @@ _notmuch_message_list_add_message (notmuch_message_list_t *list,
\r
106 node->message = message;
\r
109 - _notmuch_message_list_append (list, node);
\r
110 + *(list->tail) = node;
\r
111 + list->tail = &node->next;
\r
114 notmuch_messages_t *
\r
115 diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h
\r
116 index c054a0e..f38ccb3 100644
\r
117 --- a/lib/notmuch-private.h
\r
118 +++ b/lib/notmuch-private.h
\r
119 @@ -429,10 +429,6 @@ notmuch_message_list_t *
\r
120 _notmuch_message_list_create (const void *ctx);
\r
123 -_notmuch_message_list_append (notmuch_message_list_t *list,
\r
124 - notmuch_message_node_t *node);
\r
127 _notmuch_message_list_add_message (notmuch_message_list_t *list,
\r
128 notmuch_message_t *message);
\r