Daniel Kahn Gillmor <d...@fifthhorseman.net> writes:

> Hi Bremner--
>
> Thanks for the review!
>
> On Thu 2017-10-12 07:54:33 -0300, David Bremner wrote:
>> Daniel Kahn Gillmor <d...@fifthhorseman.net> writes:
>>
>>> This prepares us for using the crypto object in both the library and
>>> the client.
>>
>> I think we could be more precise about names here, to help outsiders get
>> up to speed on the code. libutil was renamed to libnotmuch_util, and
>> "the library" should probably be "libnotmuch".
>
> Are you asking for improved comment text in the git commit, or for
> something else?  I'm happy to provide improved comment text, if that's
> what you're asking for.
>

yes.

>>> diff --git a/crypto.c b/util/crypto.c
>>> similarity index 97%
>>> rename from crypto.c
>>> rename to util/crypto.c
>>> index 4c1b7eec..39954ca0 100644
>>> --- a/crypto.c
>>> +++ b/util/crypto.c
>>> @@ -18,7 +18,11 @@
>>>   * Authors: Jameson Rollins <jroll...@finestructure.net>
>>>   */
>>>  
>>> -#include "notmuch-client.h"
>>> +#include "crypto.h"
>>> +#include "lib/notmuch-private.h"
>>> +
>>
>> This seems like a kind of layering violation. What's in
>> notmuch-private.h that needs to be exported to things outside of lib/ ?
>
> when building against gmime-3.0, this #include supplies:
>
>     #define unused(x) x __attribute__ ((unused))
>
> When building against gmime-2.6, it provides:
>
>     #include <strings.h>
>
>
> I could replace it with these two things explicitly (and i could put
> them inside the GMIME_MAJOR_VERSION tests) if that would be preferable
> to #including lib/notmuch-private.h.  Any preference?

I guess the most correct thing would be to have a header file in util/
which has the 'unused' definition in it and is included where it is
needed. Or failing that to repeat the definition as we already do.

d




_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Reply via email to