Re: [notmuch] [PATCH 2/4] notmuch: Config option to specify tags to be applied by 'notmuch new'.

Subject: Re: [notmuch] [PATCH 2/4] notmuch: Config option to specify tags to be applied by 'notmuch new'.

Date: Wed, 02 Dec 2009 13:42:06 -0800

To: Jan Janak, Bart Trojanowski

Cc: notmuch@notmuchmail.org

From: Carl Worth


On Wed, 25 Nov 2009 22:50:08 +0100, Jan Janak <jan@ryngle.com> wrote:
> On 25-11 15:56, Bart Trojanowski wrote:
> > 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.

Call me stupid. Anything more complex than "const char *" and I can
never figure out where to put the const to express what's desired.

If "const char * const *" means what we want it to, then feel free to
return that, (and fix up existing cases). But maybe add a little block
of example code to the documentation of the function so that idiots like
me can still figure out how to declare the right kind of variable to
call the function.

-Carl
part-000.sig (application/pgp-signature)

Thread: