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 D3269431FD0
\r
6 for <notmuch@notmuchmail.org>; Wed, 22 Dec 2010 18:45:00 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.698 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001,
\r
13 HTML_MESSAGE=0.001, 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 r8sgxa3UpzBG for <notmuch@notmuchmail.org>;
\r
17 Wed, 22 Dec 2010 18:45:00 -0800 (PST)
\r
18 Received: from mail-qw0-f53.google.com (mail-qw0-f53.google.com
\r
20 by olra.theworths.org (Postfix) with ESMTP id 056A5431FB6
\r
21 for <notmuch@notmuchmail.org>; Wed, 22 Dec 2010 18:44:59 -0800 (PST)
\r
22 Received: by qwe5 with SMTP id 5so6270175qwe.26
\r
23 for <notmuch@notmuchmail.org>; Wed, 22 Dec 2010 18:44:57 -0800 (PST)
\r
24 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
\r
25 h=domainkey-signature:mime-version:received:sender:received
\r
26 :in-reply-to:references:date:x-google-sender-auth:message-id:subject
\r
27 :from:to:content-type;
\r
28 bh=r17eUEsp0x8azFVTIpZHamQf0XosGot8tBzwmiilfgw=;
\r
29 b=FGg7CnjFpBAZfUCSQx5RMJTy8Xe81gVZVfbBBmjdSRjlfj0T+46GiOSo5Ra8MY4MOB
\r
30 djIcg/3jhJHDyFLtbG23FbxwjN1LmZuWy8LsRTu+me7TzUoxn8bLIkMvX7Rei+JBIRNm
\r
31 KgLvZ+oV4XFbHLfVxjmWwQLTGCF3LL8S8/j2c=
\r
32 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
\r
33 h=mime-version:sender:in-reply-to:references:date
\r
34 :x-google-sender-auth:message-id:subject:from:to:content-type;
\r
35 b=jZ/rXmRZsBKaZ7wiYL+tRZH8azkXkaaiit0qEntNKX9L81zMoB4AZzV2fA7lDytKjx
\r
36 xjDOXwjA1YLzJGpJpVvF6RF7oShyi+Wxb9gPGd6IJROm+f/JYYJV5jY2vgCqNfJCZwM3
\r
37 cbGGXCh8fBsSNx8tiF7ExfH+3ckYAFSJIn67M=
\r
39 Received: by 10.229.238.148 with SMTP id ks20mr6628454qcb.78.1293072297811;
\r
40 Wed, 22 Dec 2010 18:44:57 -0800 (PST)
\r
41 Sender: amdragon@gmail.com
\r
42 Received: by 10.229.97.143 with HTTP; Wed, 22 Dec 2010 18:44:57 -0800 (PST)
\r
43 In-Reply-To: <1291928396-27937-3-git-send-email-amdragon@mit.edu>
\r
44 References: <1291928396-27937-1-git-send-email-amdragon@mit.edu>
\r
45 <1291928396-27937-3-git-send-email-amdragon@mit.edu>
\r
46 Date: Wed, 22 Dec 2010 21:44:57 -0500
\r
47 X-Google-Sender-Auth: Va4BIMMVpA-5JuHOeQKQIzsU2GI
\r
48 Message-ID: <AANLkTi=W63D_F6+3AJ553vZ8aV1xO9Uz6vAagxsP5c5V@mail.gmail.com>
\r
49 Subject: Re: [PATCH 2/5] Implement an internal generic string list and use it.
\r
50 From: Austin Clements <amdragon@mit.edu>
\r
51 To: notmuch@notmuchmail.org
\r
52 Content-Type: multipart/alternative; boundary=00163646b8eefade4004980adad9
\r
53 X-BeenThere: notmuch@notmuchmail.org
\r
54 X-Mailman-Version: 2.1.13
\r
56 List-Id: "Use and development of the notmuch mail system."
\r
57 <notmuch.notmuchmail.org>
\r
58 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
59 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
60 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
61 List-Post: <mailto:notmuch@notmuchmail.org>
\r
62 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
63 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
64 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
65 X-List-Received-Date: Thu, 23 Dec 2010 02:45:01 -0000
\r
67 --00163646b8eefade4004980adad9
\r
68 Content-Type: text/plain; charset=ISO-8859-1
\r
70 It seems I somehow repeated the function prototypes for tags.c and
\r
71 filenames.c twice at the bottom of notmuch-private.h (probably through some
\r
72 rebase mishap). Obviously those should be deduplicated.
\r
74 On Thu, Dec 9, 2010 at 3:59 PM, Austin Clements <amdragon@mit.edu> wrote:
\r
76 > diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h
\r
77 > index 303aeb3..b6f1095 100644
\r
78 > --- a/lib/notmuch-private.h
\r
79 > +++ b/lib/notmuch-private.h
\r
80 > @@ -453,48 +453,60 @@ notmuch_sha1_of_string (const char *str);
\r
82 > notmuch_sha1_of_file (const char *filename);
\r
88 > -_notmuch_tags_create (void *ctx);
\r
89 > +typedef struct _notmuch_string_node {
\r
91 > + struct _notmuch_string_node *next;
\r
92 > +} notmuch_string_node_t;
\r
94 > +typedef struct _notmuch_string_list {
\r
96 > + notmuch_string_node_t *head;
\r
97 > + notmuch_string_node_t **tail;
\r
98 > +} notmuch_string_list_t;
\r
100 > +notmuch_string_list_t *
\r
101 > +_notmuch_string_list_create (const void *ctx);
\r
103 > +/* Add 'string' to 'list'.
\r
105 > + * The list will create its own talloced copy of 'string'.
\r
108 > -_notmuch_tags_add_tag (notmuch_tags_t *tags, const char *tag);
\r
109 > +_notmuch_string_list_append (notmuch_string_list_t *list,
\r
110 > + const char *string);
\r
113 > -_notmuch_tags_prepare_iterator (notmuch_tags_t *tags);
\r
114 > +_notmuch_string_list_sort (notmuch_string_list_t *list);
\r
116 > -/* filenames.c */
\r
119 > +notmuch_tags_t *
\r
120 > +_notmuch_tags_create (const void *ctx, notmuch_string_list_t *list,
\r
121 > + notmuch_bool_t steal);
\r
123 > -typedef struct _notmuch_filename_node {
\r
124 > - char *filename;
\r
125 > - struct _notmuch_filename_node *next;
\r
126 > -} notmuch_filename_node_t;
\r
127 > +/* filenames.c */
\r
129 > -typedef struct _notmuch_filename_list {
\r
130 > - notmuch_filename_node_t *head;
\r
131 > - notmuch_filename_node_t **tail;
\r
132 > -} notmuch_filename_list_t;
\r
133 > +/* The notmuch_filenames_t iterates over a notmuch_string_list_t of
\r
134 > + * file names */
\r
135 > +notmuch_filenames_t *
\r
136 > +_notmuch_filenames_create (const void *ctx,
\r
137 > + notmuch_string_list_t *list);
\r
139 > -notmuch_filename_list_t *
\r
140 > -_notmuch_filename_list_create (const void *ctx);
\r
143 > -/* Add 'filename' to 'list'.
\r
145 > - * The list will create its own talloced copy of 'filename'.
\r
148 > -_notmuch_filename_list_add_filename (notmuch_filename_list_t *list,
\r
149 > - const char *filename);
\r
150 > +notmuch_tags_t *
\r
151 > +_notmuch_tags_create (const void *ctx, notmuch_string_list_t *list,
\r
152 > + notmuch_bool_t steal);
\r
155 > -_notmuch_filename_list_destroy (notmuch_filename_list_t *list);
\r
156 > +/* filenames.c */
\r
158 > -/* The notmuch_filenames_t is an iterator object for a
\r
159 > - * notmuch_filename_list_t */
\r
160 > +/* The notmuch_filenames_t iterates over a notmuch_string_list_t of
\r
161 > + * file names */
\r
162 > notmuch_filenames_t *
\r
163 > _notmuch_filenames_create (const void *ctx,
\r
164 > - notmuch_filename_list_t *list);
\r
165 > + notmuch_string_list_t *list);
\r
167 > #pragma GCC visibility pop
\r
170 --00163646b8eefade4004980adad9
\r
171 Content-Type: text/html; charset=ISO-8859-1
\r
172 Content-Transfer-Encoding: quoted-printable
\r
174 It seems I somehow repeated the function prototypes for tags.c and filename=
\r
175 s.c twice at the bottom of notmuch-private.h (probably through some rebase =
\r
176 mishap). =A0Obviously those should be deduplicated.<br><br><div class=3D"gm=
\r
178 On Thu, Dec 9, 2010 at 3:59 PM, Austin Clements <span dir=3D"ltr"><<a hr=
\r
179 ef=3D"mailto:amdragon@mit.edu">amdragon@mit.edu</a>></span> wrote:<br><b=
\r
180 lockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px =
\r
181 #ccc solid;padding-left:1ex;">
\r
182 diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h<br>
\r
183 index 303aeb3..b6f1095 100644<br>
\r
184 --- a/lib/notmuch-private.h<br>
\r
185 +++ b/lib/notmuch-private.h<br>
\r
186 @@ -453,48 +453,60 @@ notmuch_sha1_of_string (const char *str);<br>
\r
188 =A0notmuch_sha1_of_file (const char *filename);<br>
\r
191 +/* strings.c */<br>
\r
193 -notmuch_tags_t *<br>
\r
194 -_notmuch_tags_create (void *ctx);<br>
\r
195 +typedef struct _notmuch_string_node {<br>
\r
196 + =A0 =A0char *string;<br>
\r
197 + =A0 =A0struct _notmuch_string_node *next;<br>
\r
198 +} notmuch_string_node_t;<br>
\r
200 +typedef struct _notmuch_string_list {<br>
\r
201 + =A0 =A0int length;<br>
\r
202 + =A0 =A0notmuch_string_node_t *head;<br>
\r
203 + =A0 =A0notmuch_string_node_t **tail;<br>
\r
204 +} notmuch_string_list_t;<br>
\r
206 +notmuch_string_list_t *<br>
\r
207 +_notmuch_string_list_create (const void *ctx);<br>
\r
209 +/* Add 'string' to 'list'.<br>
\r
211 + * The list will create its own talloced copy of 'string'.<br>
\r
214 -_notmuch_tags_add_tag (notmuch_tags_t *tags, const char *tag);<br>
\r
215 +_notmuch_string_list_append (notmuch_string_list_t *list,<br>
\r
216 + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0const char *string=
\r
220 -_notmuch_tags_prepare_iterator (notmuch_tags_t *tags);<br>
\r
221 +_notmuch_string_list_sort (notmuch_string_list_t *list);<br>
\r
223 -/* filenames.c */<br>
\r
226 +notmuch_tags_t *<br>
\r
227 +_notmuch_tags_create (const void *ctx, notmuch_string_list_t *list,<br>
\r
228 + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 notmuch_bool_t steal);<br>
\r
230 -typedef struct _notmuch_filename_node {<br>
\r
231 - =A0 =A0char *filename;<br>
\r
232 - =A0 =A0struct _notmuch_filename_node *next;<br>
\r
233 -} notmuch_filename_node_t;<br>
\r
234 +/* filenames.c */<br>
\r
236 -typedef struct _notmuch_filename_list {<br>
\r
237 - =A0 =A0notmuch_filename_node_t *head;<br>
\r
238 - =A0 =A0notmuch_filename_node_t **tail;<br>
\r
239 -} notmuch_filename_list_t;<br>
\r
240 +/* The notmuch_filenames_t iterates over a notmuch_string_list_t of<br>
\r
241 + * file names */<br>
\r
242 +notmuch_filenames_t *<br>
\r
243 +_notmuch_filenames_create (const void *ctx,<br>
\r
244 + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0notmuch_string_list_t =
\r
247 -notmuch_filename_list_t *<br>
\r
248 -_notmuch_filename_list_create (const void *ctx);<br>
\r
251 -/* Add 'filename' to 'list'.<br>
\r
253 - * The list will create its own talloced copy of 'filename'.<br>
\r
256 -_notmuch_filename_list_add_filename (notmuch_filename_list_t *list,<br>
\r
257 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0co=
\r
258 nst char *filename);<br>
\r
259 +notmuch_tags_t *<br>
\r
260 +_notmuch_tags_create (const void *ctx, notmuch_string_list_t *list,<br>
\r
261 + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 notmuch_bool_t steal);<br>
\r
264 -_notmuch_filename_list_destroy (notmuch_filename_list_t *list);<br>
\r
265 +/* filenames.c */<br>
\r
267 -/* The notmuch_filenames_t is an iterator object for a<br>
\r
268 - * notmuch_filename_list_t */<br>
\r
269 +/* The notmuch_filenames_t iterates over a notmuch_string_list_t of<br>
\r
270 + * file names */<br>
\r
271 =A0notmuch_filenames_t *<br>
\r
272 =A0_notmuch_filenames_create (const void *ctx,<br>
\r
273 - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0notmuch_filename_list_=
\r
275 + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0notmuch_string_list_t =
\r
278 =A0#pragma GCC visibility pop<br></blockquote></div>
\r
280 --00163646b8eefade4004980adad9--
\r