Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 0731E431FBC for ; Wed, 25 Nov 2009 13:50:14 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org 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 MIhaGUo0jeoG for ; Wed, 25 Nov 2009 13:50:13 -0800 (PST) Received: from mail-ew0-f213.google.com (mail-ew0-f213.google.com [209.85.219.213]) by olra.theworths.org (Postfix) with ESMTP id 39848431FAE for ; Wed, 25 Nov 2009 13:50:13 -0800 (PST) Received: by ewy5 with SMTP id 5so171946ewy.30 for ; Wed, 25 Nov 2009 13:50:12 -0800 (PST) Received: by 10.213.24.22 with SMTP id t22mr137398ebb.59.1259185812010; Wed, 25 Nov 2009 13:50:12 -0800 (PST) Received: from x61s.janakj ([213.192.30.141]) by mx.google.com with ESMTPS id 10sm260732eyz.7.2009.11.25.13.50.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 25 Nov 2009 13:50:10 -0800 (PST) Received: by x61s.janakj (Postfix, from userid 1000) id E2A57440655; Wed, 25 Nov 2009 22:50:08 +0100 (CET) Date: Wed, 25 Nov 2009 22:50:08 +0100 From: Jan Janak To: Bart Trojanowski Message-ID: <20091125215008.GG25119@ryngle.com> References: <1259100630-13673-1-git-send-email-jan@ryngle.com> <1259100630-13673-2-git-send-email-jan@ryngle.com> <1259100630-13673-3-git-send-email-jan@ryngle.com> <20091125205639.GJ29312@jukie.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091125205639.GJ29312@jukie.net> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] [PATCH 2/4] notmuch: Config option to specify tags to be applied by 'notmuch new'. X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.12 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: Wed, 25 Nov 2009 21:50:14 -0000 Hi Bart, On 25-11 15:56, Bart Trojanowski wrote: > Jan, > > I really want this feature to get in, so I am going to do my best to > review your code :) > > Here are some more sticking points... > > > +char ** > > +notmuch_config_get_new_tags (notmuch_config_t *config, size_t *length); > > If you are not giving over control of the pointer to the caller please > return const char * const *. I followed Carl's style there, in particular the following function: notmuch_config_get_user_other_email I can, of course, change that. But maybe we should wait for Carl to see which way he prefers. > Similarly... > > > + char **new_tags; > > ... this should probably be const char **. That's the same story. I followed user_other_email there. > Next... > > > +char ** > > +notmuch_config_get_new_tags (notmuch_config_t *config, size_t *length) > > ... but ... > > > + unsigned int count, i; > > + > > + if ((tags = notmuch_config_get_new_tags (config, &count)) == NULL) > > + return; > > size_t != unsigned int on all platforms. Please stick with one or the > other. Note there are a few calls to fix here. That's a good catch. I will fix that one. Thanks a lot for the review, I really appreciate that! -- Jan