]> git.notmuchmail.org Git - notmuch/commitdiff
lib&cli: use g_object_new instead of g_object_newv
authorDavid Bremner <david@tethera.net>
Sun, 3 Sep 2017 11:55:42 +0000 (08:55 -0300)
committerDavid Bremner <david@tethera.net>
Mon, 4 Sep 2017 11:04:44 +0000 (08:04 -0300)
'g_object_newv' is deprecated, and prints annoying warnings. The
warnings suggest using 'g_object_new_with_properties', but that's only
available since glib 2.55 (i.e. a month ago as of this writing).
Since we don't actuall pass any properties, it seems we can just call
'g_object_new'.

gmime-filter-reply.c
lib/index.cc

index b269db4e821265a065989a9b00c5f714c6b96c43..847426bfe663c29695182eb5c365ac7cae831a88 100644 (file)
@@ -201,7 +201,7 @@ g_mime_filter_reply_new (gboolean encode)
 {
        GMimeFilterReply *new_reply;
 
 {
        GMimeFilterReply *new_reply;
 
-       new_reply = (GMimeFilterReply *) g_object_newv (GMIME_TYPE_FILTER_REPLY, 0, NULL);
+       new_reply = (GMimeFilterReply *) g_object_new (GMIME_TYPE_FILTER_REPLY, NULL);
        new_reply->encode = encode;
 
        return (GMimeFilter *) new_reply;
        new_reply->encode = encode;
 
        return (GMimeFilter *) new_reply;
index 10420d84426ca165659cba5118def218d6020cc3..2b98b588d38d4532173a503cc652aa5e8d3c3de1 100644 (file)
@@ -261,7 +261,7 @@ notmuch_filter_discard_non_term_new (GMimeContentType *content_type)
        type = g_type_register_static (GMIME_TYPE_FILTER, "NotmuchFilterDiscardNonTerm", &info, (GTypeFlags) 0);
     }
 
        type = g_type_register_static (GMIME_TYPE_FILTER, "NotmuchFilterDiscardNonTerm", &info, (GTypeFlags) 0);
     }
 
-    filter = (NotmuchFilterDiscardNonTerm *) g_object_newv (type, 0, NULL);
+    filter = (NotmuchFilterDiscardNonTerm *) g_object_new (type, NULL);
     filter->content_type = content_type;
     filter->state = 0;
     if (g_mime_content_type_is_type (content_type, "text", "html")) {
     filter->content_type = content_type;
     filter->state = 0;
     if (g_mime_content_type_is_type (content_type, "text", "html")) {