diff options
author | Christoph Reiter <creiter@src.gnome.org> | 2017-04-01 10:15:00 +0200 |
---|---|---|
committer | Christoph Reiter <creiter@src.gnome.org> | 2017-04-01 10:15:35 +0200 |
commit | 271e94b4e4cc9a9619015ef76880346ad7962ac4 (patch) | |
tree | bcb161064fe43bceb284f9bdc02b099dc97a2d20 | |
parent | 81625ce4c0164dcb3409471fc38168147af4026a (diff) | |
download | pygobject-271e94b4e4cc9a9619015ef76880346ad7962ac4.tar.gz |
Avoid some new deprecation warnings
https://bugzilla.gnome.org/show_bug.cgi?id=780768
-rw-r--r-- | gi/gobjectmodule.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gi/gobjectmodule.c b/gi/gobjectmodule.c index 606d1d5c..0f3448e9 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, ¶ms)) 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"); |