[pygobject] Avoid some new deprecation warnings



commit 271e94b4e4cc9a9619015ef76880346ad7962ac4
Author: Christoph Reiter <creiter src gnome org>
Date:   Sat Apr 1 10:15:00 2017 +0200

    Avoid some new deprecation warnings
    
    https://bugzilla.gnome.org/show_bug.cgi?id=780768

 gi/gobjectmodule.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gi/gobjectmodule.c b/gi/gobjectmodule.c
index 606d1d5..0f3448e 100644
--- a/gi/gobjectmodule.c
+++ b/gi/gobjectmodule.c
@@ -986,9 +986,10 @@ pygobject_constructv(PyGObject  *self,
 
     g_assert (self->obj == NULL);
     pygobject_init_wrapper_set((PyObject *) self);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
     obj = g_object_newv(pyg_type_from_object((PyObject *) self),
                         n_parameters, parameters);
-
+G_GNUC_END_IGNORE_DEPRECATIONS
     if (g_object_is_floating (obj))
         self->private_flags.flags |= PYGOBJECT_GOBJECT_WAS_FLOATING;
     pygobject_sink (obj);
@@ -1370,7 +1371,10 @@ pyg_object_new (PyGObject *self, PyObject *args, PyObject *kwargs)
     if (!pygobject_prepare_construct_properties (class, kwargs, &n_params, &params))
         goto cleanup;
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
     obj = g_object_newv(type, n_params, params);
+G_GNUC_END_IGNORE_DEPRECATIONS
+
     if (!obj)
        PyErr_SetString (PyExc_RuntimeError, "could not create object");
 


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