From: David Bremner Date: Sat, 20 May 2017 12:05:22 +0000 (-0300) Subject: lib: paper over allocation difference X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4ce7591610444a1c5ef6f56b57af8e180437fa62;p=notmuch.git lib: paper over allocation difference In gmime 3.0 this function is "transfer none", so no deallocation is needed (or permitted) --- diff --git a/lib/index.cc b/lib/index.cc index 044e4111..10420d84 100644 --- a/lib/index.cc +++ b/lib/index.cc @@ -501,7 +501,7 @@ _notmuch_message_index_file (notmuch_message_t *message, addresses = g_mime_message_get_from (mime_message); if (addresses) { _index_address_list (message, "from", addresses); - g_object_unref (addresses); + g_mime_2_6_unref (addresses); } addresses = g_mime_message_get_all_recipients (mime_message); diff --git a/notmuch-reply.c b/notmuch-reply.c index 4c1dd560..430c466c 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -286,7 +286,7 @@ static InternetAddressList *get_sender(GMimeMessage *message) if (! reply_to_header_is_redundant (message, reply_to_list)) return reply_to_list; - g_object_unref (G_OBJECT (reply_to_list)); + g_mime_2_6_unref (G_OBJECT (reply_to_list)); } return g_mime_message_get_from (message); diff --git a/util/gmime-extra.h b/util/gmime-extra.h index d744c4e4..7688129a 100644 --- a/util/gmime-extra.h +++ b/util/gmime-extra.h @@ -13,6 +13,8 @@ GMimeStream *g_mime_stream_stdout_new(void); #define GMIME_ADDRESS_TYPE_CC GMIME_RECIPIENT_TYPE_CC #define GMIME_ADDRESS_TYPE_BCC GMIME_RECIPIENT_TYPE_BCC +#define g_mime_2_6_unref(obj) g_object_unref (obj) + #else /* GMime >= 3.0 */ typedef GMimeAddressType GMimeRecipientType; @@ -51,6 +53,7 @@ typedef GMimeTrust GMimeCertificateTrust; #define GMIME_CERTIFICATE_TRUST_FULLY GMIME_TRUST_FULL #define GMIME_CERTIFICATE_TRUST_ULTIMATE GMIME_TRUST_ULTIMATE +#define g_mime_2_6_unref(obj) /*ignore*/ #endif /**