[PATCH 13/16] gmime-cleanup: pass NULL as default GMimeParserOptions

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed May 1 22:16:50 PDT 2019


This is a functional change, not a straight translation, because we
are no longer directly invoking g_mime_parser_options_get_default(),
but the GMime source has indicated that the options parameter for
g_mime_parser_construct_message() is "nullable" since upstream commit
d0ebdd2ea3e6fa635a2a551c846e9bc8b6040353 (which itself precedes GMime
3.0).

Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
---
 lib/message-file.c | 2 +-
 mime-node.c        | 2 +-
 util/gmime-extra.h | 2 --
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/lib/message-file.c b/lib/message-file.c
index c507ee34..18802974 100644
--- a/lib/message-file.c
+++ b/lib/message-file.c
@@ -152,7 +152,7 @@ _notmuch_message_file_parse (notmuch_message_file_t *message)
     parser = g_mime_parser_new_with_stream (stream);
     g_mime_parser_set_scan_from (parser, is_mbox);
 
-    message->message = g_mime_parser_construct_message (parser);
+    message->message = g_mime_parser_construct_message (parser, NULL);
     if (! message->message) {
 	status = NOTMUCH_STATUS_FILE_NOT_EMAIL;
 	goto DONE;
diff --git a/mime-node.c b/mime-node.c
index 4b9734f3..60589f81 100644
--- a/mime-node.c
+++ b/mime-node.c
@@ -121,7 +121,7 @@ mime_node_open (const void *ctx, notmuch_message_t *message,
 	goto DONE;
     }
 
-    mctx->mime_message = g_mime_parser_construct_message (mctx->parser);
+    mctx->mime_message = g_mime_parser_construct_message (mctx->parser, NULL);
     if (!mctx->mime_message) {
 	fprintf (stderr, "Failed to parse %s\n", filename);
 	status = NOTMUCH_STATUS_FILE_ERROR;
diff --git a/util/gmime-extra.h b/util/gmime-extra.h
index d2636b78..a42e43e7 100644
--- a/util/gmime-extra.h
+++ b/util/gmime-extra.h
@@ -9,8 +9,6 @@ extern "C" {
 
 GMimeStream *g_mime_stream_stdout_new(void);
 
-#define g_mime_parser_construct_message(p) g_mime_parser_construct_message (p, g_mime_parser_options_get_default ())
-
 /**
  * Get last 16 hex digits of fingerprint ("keyid")
  */
-- 
2.20.1



More information about the notmuch mailing list