[gjs] Silence compiler warnings for g_object_newv()



commit 26b5bdcfe2104a9613c4dce594fc26fd4a6708ce
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 0bd4b12..ca78966 100644
--- a/gi/object.cpp
+++ b/gi/object.cpp
@@ -1274,7 +1274,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(), &params[0]);
+G_GNUC_END_IGNORE_DEPRECATIONS
 
     free_g_params(&params[0], params.size());
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]