From: Austin Clements <amdragon@mit.edu>
To: notmuch@notmuchmail.org
Subject: Re: [PATCH 2/5] Implement an internal generic string list and use it.
Date: Wed, 22 Dec 2010 21:44:57 -0500 [thread overview]
Message-ID: <AANLkTi=W63D_F6+3AJ553vZ8aV1xO9Uz6vAagxsP5c5V@mail.gmail.com> (raw)
In-Reply-To: <1291928396-27937-3-git-send-email-amdragon@mit.edu>
[-- Attachment #1: Type: text/plain, Size: 3164 bytes --]
It seems I somehow repeated the function prototypes for tags.c and
filenames.c twice at the bottom of notmuch-private.h (probably through some
rebase mishap). Obviously those should be deduplicated.
On Thu, Dec 9, 2010 at 3:59 PM, Austin Clements <amdragon@mit.edu> wrote:
> diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h
> index 303aeb3..b6f1095 100644
> --- a/lib/notmuch-private.h
> +++ b/lib/notmuch-private.h
> @@ -453,48 +453,60 @@ notmuch_sha1_of_string (const char *str);
> char *
> notmuch_sha1_of_file (const char *filename);
>
> -/* tags.c */
> +/* strings.c */
>
> -notmuch_tags_t *
> -_notmuch_tags_create (void *ctx);
> +typedef struct _notmuch_string_node {
> + char *string;
> + struct _notmuch_string_node *next;
> +} notmuch_string_node_t;
> +
> +typedef struct _notmuch_string_list {
> + int length;
> + notmuch_string_node_t *head;
> + notmuch_string_node_t **tail;
> +} notmuch_string_list_t;
>
> +notmuch_string_list_t *
> +_notmuch_string_list_create (const void *ctx);
> +
> +/* Add 'string' to 'list'.
> + *
> + * The list will create its own talloced copy of 'string'.
> + */
> void
> -_notmuch_tags_add_tag (notmuch_tags_t *tags, const char *tag);
> +_notmuch_string_list_append (notmuch_string_list_t *list,
> + const char *string);
>
> void
> -_notmuch_tags_prepare_iterator (notmuch_tags_t *tags);
> +_notmuch_string_list_sort (notmuch_string_list_t *list);
>
> -/* filenames.c */
> +/* tags.c */
> +
> +notmuch_tags_t *
> +_notmuch_tags_create (const void *ctx, notmuch_string_list_t *list,
> + notmuch_bool_t steal);
>
> -typedef struct _notmuch_filename_node {
> - char *filename;
> - struct _notmuch_filename_node *next;
> -} notmuch_filename_node_t;
> +/* filenames.c */
>
> -typedef struct _notmuch_filename_list {
> - notmuch_filename_node_t *head;
> - notmuch_filename_node_t **tail;
> -} notmuch_filename_list_t;
> +/* The notmuch_filenames_t iterates over a notmuch_string_list_t of
> + * file names */
> +notmuch_filenames_t *
> +_notmuch_filenames_create (const void *ctx,
> + notmuch_string_list_t *list);
>
> -notmuch_filename_list_t *
> -_notmuch_filename_list_create (const void *ctx);
> +/* tags.c */
>
> -/* Add 'filename' to 'list'.
> - *
> - * The list will create its own talloced copy of 'filename'.
> - */
> -void
> -_notmuch_filename_list_add_filename (notmuch_filename_list_t *list,
> - const char *filename);
> +notmuch_tags_t *
> +_notmuch_tags_create (const void *ctx, notmuch_string_list_t *list,
> + notmuch_bool_t steal);
>
> -void
> -_notmuch_filename_list_destroy (notmuch_filename_list_t *list);
> +/* filenames.c */
>
> -/* The notmuch_filenames_t is an iterator object for a
> - * notmuch_filename_list_t */
> +/* The notmuch_filenames_t iterates over a notmuch_string_list_t of
> + * file names */
> notmuch_filenames_t *
> _notmuch_filenames_create (const void *ctx,
> - notmuch_filename_list_t *list);
> + notmuch_string_list_t *list);
>
> #pragma GCC visibility pop
>
[-- Attachment #2: Type: text/html, Size: 3724 bytes --]
next prev parent reply other threads:[~2010-12-23 2:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-09 20:59 [PATCH 0/5] Fetch all message metadata in a single pass Austin Clements
2010-12-09 20:59 ` [PATCH 1/5] Use a single unified pass to fetch scalar message metadata Austin Clements
2010-12-09 20:59 ` [PATCH 2/5] Implement an internal generic string list and use it Austin Clements
2010-12-23 2:44 ` Austin Clements [this message]
2010-12-09 20:59 ` [PATCH 3/5] Add a generic function to get a list of terms with some prefix Austin Clements
2010-12-09 20:59 ` [PATCH 4/5] Add the file name list to the unified message metadata pass Austin Clements
2010-12-09 20:59 ` [PATCH 5/5] Add the tag " Austin Clements
2011-02-13 20:25 ` [PATCH 0/5] Fetch all message metadata in a single pass Austin Clements
2011-03-11 3:48 ` Carl Worth
2011-03-21 6:56 ` Austin Clements
2011-04-25 20:52 ` Carl Worth
2011-04-25 21:42 ` Carl Worth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTi=W63D_F6+3AJ553vZ8aV1xO9Uz6vAagxsP5c5V@mail.gmail.com' \
--to=amdragon@mit.edu \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).