[PATCH v3 04/15] crypto: move into libutil

Daniel Kahn Gillmor dkg at fifthhorseman.net
Thu Oct 12 07:07:10 PDT 2017


Hi Bremner--

Thanks for the review!

On Thu 2017-10-12 07:54:33 -0300, David Bremner wrote:
> Daniel Kahn Gillmor <dkg at 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.

>> 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 <jrollins at 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?

   --dkg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20171012/e41f461b/attachment.sig>


More information about the notmuch mailing list