[gjs: 1/2] gdbus: Fix deprecated API
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 1/2] gdbus: Fix deprecated API
- Date: Tue, 19 Jun 2018 00:26:17 +0000 (UTC)
commit af5a37eca66034b72f056f1dc2960db111b01020
Author: Philip Chimento <philip chimento gmail com>
Date: Mon Jun 18 16:38:24 2018 -0700
gdbus: Fix deprecated API
Use G_DEFINE_TYPE_WITH_PRIVATE() instead of g_type_class_add_private().
libgjs-private/gjs-gdbus-wrapper.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/libgjs-private/gjs-gdbus-wrapper.cpp b/libgjs-private/gjs-gdbus-wrapper.cpp
index 758c5b49..e43d98c0 100644
--- a/libgjs-private/gjs-gdbus-wrapper.cpp
+++ b/libgjs-private/gjs-gdbus-wrapper.cpp
@@ -35,7 +35,8 @@ struct _GjsDBusImplementationPrivate {
_Pragma("GCC diagnostic push")
_Pragma("GCC diagnostic ignored \"-Wcast-function-type\"")
#endif
-G_DEFINE_TYPE(GjsDBusImplementation, gjs_dbus_implementation, G_TYPE_DBUS_INTERFACE_SKELETON)
+G_DEFINE_TYPE_WITH_PRIVATE(GjsDBusImplementation, gjs_dbus_implementation,
+ G_TYPE_DBUS_INTERFACE_SKELETON);
#if __GNUC__ >= 8
_Pragma("GCC diagnostic pop")
#endif
@@ -217,8 +218,6 @@ gjs_dbus_implementation_class_init(GjsDBusImplementationClass *klass) {
GObjectClass *gobject_class = G_OBJECT_CLASS(klass);
GDBusInterfaceSkeletonClass *skeleton_class = G_DBUS_INTERFACE_SKELETON_CLASS(klass);
- g_type_class_add_private(klass, sizeof(GjsDBusImplementationPrivate));
-
gobject_class->finalize = gjs_dbus_implementation_finalize;
gobject_class->set_property = gjs_dbus_implementation_set_property;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]