On Thu, 01 Apr 2010 14:05:06 +0200, Michal Sojka <sojk...@fel.cvut.cz> wrote: > On Thu, 04 Mar 2010, Gregor Hoffleit wrote: > > - printf (", \"content\": %s", json_quote_str (ctx, (char *) > > part_content->data)); > > + content_data = talloc_size (ctx, part_content->len+1); > > + memcpy (content_data, (char *)part_content->data, part_content->len+1); > > + content_data[part_content->len] = 0; > > + printf (", \"content\": %s", json_quote_str (ctx, content_data)); > > What about modifying json_quote_str() to accept additional parameter > len? If I have 10MB attachment to the email, this unnecessary copy is > quite expensive, isn't it?
Agreed. How about this patch: http://github.com/dme/notmuch/commit/5f23ae341788d28e455e53488d184d8caaa618c5 ? dme. -- David Edmondson, http://dme.org _______________________________________________ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch