[gjs/gnome-3-24] Silence compiler warnings for g_object_newv()
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/gnome-3-24] Silence compiler warnings for g_object_newv()
- Date: Sun, 9 Apr 2017 22:36:10 +0000 (UTC)
commit 43941745b6ff43e011cb6f4815b30c857f4cb990
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sun Apr 2 14:42:39 2017 +0100
Silence compiler warnings for g_object_newv()
GLib 2.53 has deprecated g_object_newv() and GParameter in favour of a
more idiomatic g_object_new_with_properties() function taking an array
of propert names and an array of property values.
Since GJS is now in development, the default compiler flags include
-Werror=deprecated-declaration, which breaks the build under the GNOME
Continuous build.
Silencing the compiler warning is the simplest way to avoid a build
break.
https://bugzilla.gnome.org/show_bug.cgi?id=780844
gi/object.cpp | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gi/object.cpp b/gi/object.cpp
index 78eeaca..a87c5f9 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -1446,7 +1446,9 @@ object_instance_init (JSContext *context,
object_init_list.emplace(context, object);
}
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gobj = (GObject*) g_object_newv(gtype, params.size(), ¶ms[0]);
+G_GNUC_END_IGNORE_DEPRECATIONS
free_g_params(¶ms[0], params.size());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]