From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id A2FB4431FCF for ; Sat, 24 Nov 2012 20:57:30 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id m-IGL6SD6IUe for ; Sat, 24 Nov 2012 20:57:29 -0800 (PST) Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU [18.9.25.14]) by olra.theworths.org (Postfix) with ESMTP id 1C2C1431FCB for ; Sat, 24 Nov 2012 20:57:27 -0800 (PST) X-AuditID: 1209190e-b7f756d000000904-91-50b1a537fe1d Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP id 2E.69.02308.735A1B05; Sat, 24 Nov 2012 23:57:27 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id qAP4vG0X012785; Sat, 24 Nov 2012 23:57:16 -0500 Received: from drake.dyndns.org (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com [209.6.116.242]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id qAP4vEva000083 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Sat, 24 Nov 2012 23:57:16 -0500 (EST) Received: from amthrax by drake.dyndns.org with local (Exim 4.77) (envelope-from ) id 1TcUHJ-0003Zp-U0; Sat, 24 Nov 2012 23:57:13 -0500 From: Austin Clements To: notmuch@notmuchmail.org Subject: [PATCH 3/6] lib: Eliminate _notmuch_message_list_append Date: Sat, 24 Nov 2012 23:57:04 -0500 Message-Id: <1353819427-13182-4-git-send-email-amdragon@mit.edu> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1353819427-13182-1-git-send-email-amdragon@mit.edu> References: <1353819427-13182-1-git-send-email-amdragon@mit.edu> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrNIsWRmVeSWpSXmKPExsUixG6nrmu+dGOAweceNYvVc3ksrt+cyezA 5LFz1l12j2erbjEHMEVx2aSk5mSWpRbp2yVwZez/+oSxYAtvxbqVfUwNjA+5uhg5OSQETCRu t6xigrDFJC7cW8/WxcjFISSwj1FiyZ31jCAJIYENjBInvwRDJB4xSTTc2cUM4cxllNiweQYr SBWbgIbEtv3LwTpEBKQldt6dDRZnFnCU+Lx/ERuILSzgILFi5hVmEJtFQFXi8Nxd7CA2L1B8 /d8PrBBnKEp0P5sAVM/BwQnU27hXDuIIB4lb/yYxT2DkX8DIsIpRNiW3Sjc3MTOnODVZtzg5 MS8vtUjXWC83s0QvNaV0EyMojDgl+XYwfj2odIhRgINRiYf3RuLGACHWxLLiytxDjJIcTEqi vJmLgEJ8SfkplRmJxRnxRaU5qcWHGCU4mJVEeK1VgXK8KYmVValF+TApaQ4WJXHeKyk3/YUE 0hNLUrNTUwtSi2CyMhwcShK8IkuAGgWLUtNTK9Iyc0oQ0kwcnCDDeYCGi4LU8BYXJOYWZ6ZD 5E8xKkqJ835eDJQQAElklObB9cLi/BWjONArwrxMIO08wBQB1/0KaDAT0OCns9eBDC5JREhJ NTAyaL2QeSYb6HCU0+T/0TO/d7anH3Db/bdONEtW/+HeuQU3lsmlNW3hu5Z0+82Kc5zTzh38 l+B15zfXzLuqDdNfxV9s7lOYIxtVL+6y/abYh+2T7zIfvy9nk//K+2ZehKzaMa2O+QGK7zwW L6uYd+7Lzjgrj0Ttxc6/Hh+Kub1O7YRLk0yYy6sVSizFGYmGWsxFxYkAxeozpM4CAAA= X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Nov 2012 04:57:31 -0000 This API invited micro-optimized and complicated list pointer manipulation and is no longer used. --- lib/messages.c | 17 +++-------------- lib/notmuch-private.h | 4 ---- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/lib/messages.c b/lib/messages.c index 1121864..0eee569 100644 --- a/lib/messages.c +++ b/lib/messages.c @@ -42,19 +42,7 @@ _notmuch_message_list_create (const void *ctx) return list; } -/* Append a single 'node' to the end of 'list'. - */ -void -_notmuch_message_list_append (notmuch_message_list_t *list, - notmuch_message_node_t *node) -{ - *(list->tail) = node; - list->tail = &node->next; -} - -/* Allocate a new node for 'message' and append it to the end of - * 'list'. - */ +/* Append 'message' to the end of 'list'. */ void _notmuch_message_list_add_message (notmuch_message_list_t *list, notmuch_message_t *message) @@ -64,7 +52,8 @@ _notmuch_message_list_add_message (notmuch_message_list_t *list, node->message = message; node->next = NULL; - _notmuch_message_list_append (list, node); + *(list->tail) = node; + list->tail = &node->next; } notmuch_messages_t * diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h index c054a0e..f38ccb3 100644 --- a/lib/notmuch-private.h +++ b/lib/notmuch-private.h @@ -429,10 +429,6 @@ notmuch_message_list_t * _notmuch_message_list_create (const void *ctx); void -_notmuch_message_list_append (notmuch_message_list_t *list, - notmuch_message_node_t *node); - -void _notmuch_message_list_add_message (notmuch_message_list_t *list, notmuch_message_t *message); -- 1.7.10.4