From a18b244e95f93cc8f463b94eb395ebb3ee215b7a Mon Sep 17 00:00:00 2001 From: Tomi Ollila Date: Mon, 13 Jun 2016 11:10:50 +0300 Subject: [PATCH] Re: [PATCH 2/8] lib: private string map (associative array) API --- ab/ee53dd137c0d33a8b3fbba4dbac97391df01ed | 87 +++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 ab/ee53dd137c0d33a8b3fbba4dbac97391df01ed diff --git a/ab/ee53dd137c0d33a8b3fbba4dbac97391df01ed b/ab/ee53dd137c0d33a8b3fbba4dbac97391df01ed new file mode 100644 index 000000000..c89d571fe --- /dev/null +++ b/ab/ee53dd137c0d33a8b3fbba4dbac97391df01ed @@ -0,0 +1,87 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 990B06DE0159 + for ; Mon, 13 Jun 2016 01:11:27 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.569 +X-Spam-Level: +X-Spam-Status: No, score=0.569 tagged_above=-999 required=5 tests=[AWL=-0.083, + SPF_NEUTRAL=0.652] autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id LCxPDj2AiK3h for ; + Mon, 13 Jun 2016 01:11:19 -0700 (PDT) +Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) + by arlo.cworth.org (Postfix) with ESMTP id BB2CE6DE0127 + for ; Mon, 13 Jun 2016 01:11:17 -0700 (PDT) +Received: from guru.guru-group.fi (localhost [IPv6:::1]) + by guru.guru-group.fi (Postfix) with ESMTP id 07925100063; + Mon, 13 Jun 2016 11:10:51 +0300 (EEST) +From: Tomi Ollila +To: David Bremner , notmuch@notmuchmail.org +Subject: Re: [PATCH 2/8] lib: private string map (associative array) API +In-Reply-To: <1465779955-5539-3-git-send-email-david@tethera.net> +References: <1465779955-5539-1-git-send-email-david@tethera.net> + <1465779955-5539-3-git-send-email-david@tethera.net> +User-Agent: Notmuch/0.22+54~gf8fd4ff (https://notmuchmail.org) Emacs/24.5.1 + (x86_64-unknown-linux-gnu) +X-Face: HhBM'cA~ +MIME-Version: 1.0 +Content-Type: text/plain +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +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: Mon, 13 Jun 2016 08:11:27 -0000 + +On Mon, Jun 13 2016, David Bremner wrote: + +> The choice of array implementation is deliberate, for future iterator support +> --- +> lib/Makefile.local | 1 + +> lib/notmuch-private.h | 11 ++++ +> lib/string-map.c | 153 ++++++++++++++++++++++++++++++++++++++++++++++++++ +> 3 files changed, 165 insertions(+) +> create mode 100644 lib/string-map.c +> +> diff --git a/lib/Makefile.local b/lib/Makefile.local +> index beb9635..9280880 100644 +> --- a/lib/Makefile.local +> +++ b/lib/Makefile.local +> @@ -40,6 +40,7 @@ libnotmuch_c_srcs = \ +> $(dir)/messages.c \ +> $(dir)/sha1.c \ +> $(dir)/built-with.c \ +> + $(dir)/string-map.c \ +> $(dir)/tags.c + +I suggest everyone to install editor which supports showing tabs & spaces +e.g. in different color and also visualizes trailing whitespace & trailing +empty lines... + +... personally I've been pretty happy with ethan-wspace in emacs to do +that (I did M-x ethan-wspace-highlight-tabs-mode (in notmuch-show mode +buffer) to recognize the above). + +If there is no need to further changes then the above can IMO go in -- +the same "dirtiness" can be observed in $(dir)/query-fp.cc 10 lines below... + +HTH. + +Tomi + -- 2.26.2