From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id CDD076DE261A for ; Sat, 15 Jul 2017 16:01:55 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[AWL=0.000] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ryrgD2GPHFqA for ; Sat, 15 Jul 2017 16:01:55 -0700 (PDT) Received: from che.mayfirst.org (che.mayfirst.org [162.247.75.118]) by arlo.cworth.org (Postfix) with ESMTP id 2EB446DE2613 for ; Sat, 15 Jul 2017 16:01:52 -0700 (PDT) Received: from fifthhorseman.net (38.200.broadband6.iol.cz [88.101.200.38]) by che.mayfirst.org (Postfix) with ESMTPSA id 190FAF99D; Sat, 15 Jul 2017 19:01:50 -0400 (EDT) Received: by fifthhorseman.net (Postfix, from userid 1000) id 24DE120DF8; Sun, 16 Jul 2017 00:45:31 +0200 (CEST) From: Daniel Kahn Gillmor To: David Bremner , Notmuch Mail Subject: Re: [PATCH 3/4] crypto: Avoid explicit handling of GMimeCryptoContext in gmime 3 In-Reply-To: <20170715185744.17640-3-david@tethera.net> References: <20170714131202.24966-3-dkg@fifthhorseman.net> <20170715185744.17640-1-david@tethera.net> <20170715185744.17640-3-david@tethera.net> Date: Sun, 16 Jul 2017 00:45:27 +0200 Message-ID: <87mv85qpyw.fsf@fifthhorseman.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 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: Sat, 15 Jul 2017 23:01:55 -0000 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Thanks for trying to talk me down from my ifdefery, Bremner :) I think this subseries looks reasonable, though: On Sat 2017-07-15 15:57:43 -0300, David Bremner wrote: > diff --git a/notmuch-reply.c b/notmuch-reply.c > index 40201b80..4df29b82 100644 > --- a/notmuch-reply.c > +++ b/notmuch-reply.c > @@ -759,7 +759,9 @@ notmuch_reply_command (notmuch_config_t *config, int = argc, char *argv[]) > if (do_reply (config, query, ¶ms, format, reply_all) !=3D 0) > return EXIT_FAILURE; >=20=20 > +#if (GMIME_MAJOR_VERSION < 3) > notmuch_crypto_cleanup (¶ms.crypto); > +#endif > notmuch_query_destroy (query); > notmuch_database_destroy (notmuch); >=20=20 > diff --git a/notmuch-show.c b/notmuch-show.c > index 74e77249..4feba07b 100644 > --- a/notmuch-show.c > +++ b/notmuch-show.c > @@ -1241,7 +1241,9 @@ notmuch_show_command (notmuch_config_t *config, int= argc, char *argv[]) > g_mime_stream_flush (params.out_stream); > g_object_unref (params.out_stream); >=20=20 > +#if (GMIME_MAJOR_VERSION < 3) > notmuch_crypto_cleanup (¶ms.crypto); > +#endif > notmuch_query_destroy (query); > notmuch_database_destroy (notmuch); If you prefer to reduce #ifdefery, we can also just make notmuch_crypto_cleanup a no-op in gmime 3.0, right? that might be simpler (because maybe something happens in notmuch_crypto that we do ultimately want to clean up later anyway?) --dkg --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEOCdgUepHf6PklTkyFJitxsGSMjcFAllqmwgACgkQFJitxsGS Mjcbzw/9FXqmUvzpATKq20TRMFBJP1T9ITpNShJWevAqcraUC4E7IPysIE7MM0jO JKlCjqL2OR7kYqQB6/Sdi+jTi5fvF65LrVjSIef2HFI6d7jXIP1VbTKv4BhKOgv0 wE5Nt7adOcxy+3MOBd35F3hVHJRsNu0mqg2mrlgeJCz9b5WC/dxfA4DejNJaXg/U b4UrctlIjgt7+7SjKv8XdD/R/bgU3kt0pbwlAAhf6PN3N2b/DnqRv9hU9g6FtDT5 8iZ1mU8Z7XhwN0l/dRGbLDO3RkbIthYj2BnIepf97pPXS0VBsS4vfPCsFNgJVVTq EQh0y7f8LNl0/PhP54wAui+eebvthGsj5W32QTsef3fkEfuh1lbuuiSVViPh9p6q 487Y2g9BMF9uns88z3kd3lmkzIBHEp2vkdoBlVziDOw2dXtptPzmq5tk1e+8X5c8 mYU03B7o46KkofKZCqjeP45AuaZh+J/Sgi6YVf7VQfI8mNuY+V4J/5KkwQan3KXO tcvvC+u7SYb6yH5c9puHAU2/TExkvO/MGpAo9VtXqrXlE77coYz13kmI2dHdqSY9 1d8JWSERvPTbSW/jJf9ugzhEZxR8asE6y/Ca18GZMPLIHqlXv3uGzZKir/k03Ep8 ojnlrHkqlrpfDGJaEnoB1fof2ru+kGipAEl+ArS3jJ6hvR29lts= =2uAs -----END PGP SIGNATURE----- --=-=-=--