1 Return-Path: <dme@dme.org>
\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 85A864196F4
\r
6 for <notmuch@notmuchmail.org>; Mon, 5 Apr 2010 02:36:49 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5
\r
12 tests=[BAYES_00=-1.9] autolearn=ham
\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 b124mwwkVTWa for <notmuch@notmuchmail.org>;
\r
16 Mon, 5 Apr 2010 02:36:48 -0700 (PDT)
\r
17 Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com
\r
19 by olra.theworths.org (Postfix) with ESMTP id 0E7734196F0
\r
20 for <notmuch@notmuchmail.org>; Mon, 5 Apr 2010 02:36:47 -0700 (PDT)
\r
21 Received: by wyj26 with SMTP id 26so1415250wyj.26
\r
22 for <notmuch@notmuchmail.org>; Mon, 05 Apr 2010 02:36:47 -0700 (PDT)
\r
23 Received: by 10.216.174.129 with SMTP id x1mr3087115wel.140.1270460206850;
\r
24 Mon, 05 Apr 2010 02:36:46 -0700 (PDT)
\r
25 Received: from ut.hh.sledj.net (host83-217-165-81.dsl.vispa.com
\r
27 by mx.google.com with ESMTPS id p10sm24844022gvf.22.2010.04.05.02.36.39
\r
28 (version=TLSv1/SSLv3 cipher=RC4-MD5);
\r
29 Mon, 05 Apr 2010 02:36:40 -0700 (PDT)
\r
30 Received: by ut.hh.sledj.net (Postfix, from userid 1000)
\r
31 id 2153A5941EC; Mon, 5 Apr 2010 10:36:38 +0100 (BST)
\r
32 To: Michal Sojka <sojkam1@fel.cvut.cz>, David Bremner <david@tethera.net>,
\r
33 Gregor Hoffleit <gregor@hoffleit.de>, notmuch <notmuch@notmuchmail.org>
\r
34 In-Reply-To: <874ojv5qfh.fsf@steelpick.2x.cz>
\r
35 References: <1267699753-sup-3919@sam.mediasupervision.de>
\r
36 <871vezs8ne.fsf@rocinante.cs.unb.ca> <87634bjsrl.fsf@ut.hh.sledj.net>
\r
37 <874ojv5qfh.fsf@steelpick.2x.cz>
\r
38 From: David Edmondson <dme@dme.org>
\r
39 Date: Mon, 05 Apr 2010 10:36:38 +0100
\r
40 Message-ID: <878w929r6h.fsf@ut.hh.sledj.net>
\r
42 Content-Type: text/plain; charset=us-ascii
\r
43 Subject: Re: [notmuch] [PATCH] format_part_json: part_content->data is not
\r
45 X-BeenThere: notmuch@notmuchmail.org
\r
46 X-Mailman-Version: 2.1.13
\r
48 List-Id: "Use and development of the notmuch mail system."
\r
49 <notmuch.notmuchmail.org>
\r
50 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
51 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
52 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
53 List-Post: <mailto:notmuch@notmuchmail.org>
\r
54 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
55 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
56 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
57 X-List-Received-Date: Mon, 05 Apr 2010 09:36:49 -0000
\r
59 On Thu, 01 Apr 2010 14:05:06 +0200, Michal Sojka <sojkam1@fel.cvut.cz> wrote:
\r
60 > On Thu, 04 Mar 2010, Gregor Hoffleit wrote:
\r
61 > > - printf (", \"content\": %s", json_quote_str (ctx, (char *) part_content->data));
\r
62 > > + content_data = talloc_size (ctx, part_content->len+1);
\r
63 > > + memcpy (content_data, (char *)part_content->data, part_content->len+1);
\r
64 > > + content_data[part_content->len] = 0;
\r
65 > > + printf (", \"content\": %s", json_quote_str (ctx, content_data));
\r
67 > What about modifying json_quote_str() to accept additional parameter
\r
68 > len? If I have 10MB attachment to the email, this unnecessary copy is
\r
69 > quite expensive, isn't it?
\r
71 Agreed. How about this patch:
\r
72 http://github.com/dme/notmuch/commit/5f23ae341788d28e455e53488d184d8caaa618c5
\r
77 David Edmondson, http://dme.org
\r