From: Jani Nikula Date: Sat, 8 Jun 2013 08:38:45 +0000 (+0300) Subject: Re: [PATCH v2 1/1] cli: Guard deprecated g_type_init calls X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f0303b87ae0fb46da7ed6cd3f1de2d493a4c7afd;p=notmuch-archives.git Re: [PATCH v2 1/1] cli: Guard deprecated g_type_init calls --- diff --git a/70/050747f75f1a9e6b3f53e66d2e73e4bae53184 b/70/050747f75f1a9e6b3f53e66d2e73e4bae53184 new file mode 100644 index 000000000..2e466b476 --- /dev/null +++ b/70/050747f75f1a9e6b3f53e66d2e73e4bae53184 @@ -0,0 +1,131 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 1E972431FAF + for ; Sat, 8 Jun 2013 01:39:00 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id ATRUZqM9ODHI for ; + Sat, 8 Jun 2013 01:38:52 -0700 (PDT) +Received: from mail-la0-f50.google.com (mail-la0-f50.google.com + [209.85.215.50]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 2A02F431FAE + for ; Sat, 8 Jun 2013 01:38:52 -0700 (PDT) +Received: by mail-la0-f50.google.com with SMTP id dy20so2167767lab.37 + for ; Sat, 08 Jun 2013 01:38:49 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=google.com; s=20120113; + h=from:to:cc:subject:in-reply-to:references:user-agent:date + :message-id:mime-version:content-type:content-transfer-encoding + :x-gm-message-state; + bh=RV06Ozouq+uIlGc8sSydBwGQpBAo0z9G5anpOUtneZ4=; + b=meiU9k83+5B8E4S+64jyeCXLhTmXWym9lEMnjSAYDYOUL14giXUzvrM/EeOC9WvAs4 + V1O9jEKTtJBk3jeJ08tihCu8fEotxU3TDsjQ0adGGv1QA9pJqlYZf3WPQy+opJU57HLR + uZR/ubuQ30a3vu+1OIdpuLZQM+TTFv9ZOQ0DLp2JdvbxNxzR2caFXvM3OoUxrRmwADas + 6aBmsLuPnAYXyEAMf2C4NuKIZlGnVLmW2kTN4ax6CToDPBquwUFefdVkJdKzMLZZdfgp + N037A9i5Ib2mpbLGDiqctKbnqKnDT7RWLwWYEwbsypBytQSKWSgWHh440DcmHngfIpXT + VRDA== +X-Received: by 10.112.142.228 with SMTP id rz4mr2723193lbb.62.1370680729195; + Sat, 08 Jun 2013 01:38:49 -0700 (PDT) +Received: from localhost (dsl-hkibrasgw2-58c376-211.dhcp.inet.fi. + [88.195.118.211]) + by mx.google.com with ESMTPSA id i2sm819731lah.5.2013.06.08.01.38.47 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sat, 08 Jun 2013 01:38:48 -0700 (PDT) +From: Jani Nikula +To: Tomi Ollila , notmuch@notmuchmail.org +Subject: Re: [PATCH v2 1/1] cli: Guard deprecated g_type_init calls +In-Reply-To: <1370630473-2033-1-git-send-email-tomi.ollila@iki.fi> +References: <1370630473-2033-1-git-send-email-tomi.ollila@iki.fi> +User-Agent: Notmuch/0.15.2+175~g44e86f1 (http://notmuchmail.org) Emacs/24.3.1 + (x86_64-pc-linux-gnu) +Date: Sat, 08 Jun 2013 11:38:45 +0300 +Message-ID: <878v2lro8a.fsf@nikula.org> +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: quoted-printable +X-Gm-Message-State: + ALoCoQmlpsJh+REXGxG6wdwZV3i5p9WV5IcIb1dLDSjV0YOLiOuhEtiAdeVUhHobDVKJ9UAiPMDW +Cc: tomi.ollila@iki.fi +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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, 08 Jun 2013 08:39:00 -0000 + +On Fri, 07 Jun 2013, Tomi Ollila wrote: +> g_type_init was deprecated in GLib 2.35.1. In order to compile +> cleanly, guard these with a suitable #if. + +Looks good, tests pass. + +Jani. + + +> +> (commit msg from https://bugs.freedesktop.org/attachment.cgi?id=3D73774 ) +> --- +> +> v2 of id:1370614090-1715-1-git-send-email-tomi.ollila@iki.fi +> +> database.cc was not caught by my na=C3=AFve grep g_type_init **/*.c +> (have to learn git grep !) +> +> also added back one newline removed in v1 +> +> lib/database.cc | 2 ++ +> notmuch.c | 2 ++ +> 2 files changed, 4 insertions(+) +> +> diff --git a/lib/database.cc b/lib/database.cc +> index 52ed618..5cc0765 100644 +> --- a/lib/database.cc +> +++ b/lib/database.cc +> @@ -649,7 +649,9 @@ notmuch_database_open (const char *path, +> } +>=20=20 +> /* Initialize the GLib type system and threads */ +> +#if !GLIB_CHECK_VERSION(2, 35, 1) +> g_type_init (); +> +#endif +>=20=20 +> /* Initialize gmime */ +> if (! initialized) { +> diff --git a/notmuch.c b/notmuch.c +> index 99ddd6d..45a73ce 100644 +> --- a/notmuch.c +> +++ b/notmuch.c +> @@ -291,7 +291,9 @@ main (int argc, char *argv[]) +> local =3D talloc_new (NULL); +>=20=20 +> g_mime_init (0); +> +#if !GLIB_CHECK_VERSION(2, 35, 1) +> g_type_init (); +> +#endif +>=20=20 +> /* Globally default to the current output format version. */ +> notmuch_format_version =3D NOTMUCH_FORMAT_CUR; +> --=20 +> 1.8.0 +> +> _______________________________________________ +> notmuch mailing list +> notmuch@notmuchmail.org +> http://notmuchmail.org/mailman/listinfo/notmuch