diff options
author | Christian Kellner <christian@kellner.me> | 2019-02-21 12:09:06 +0100 |
---|---|---|
committer | Christian Kellner <christian@kellner.me> | 2019-02-21 12:09:06 +0100 |
commit | 9b7ce3dea303f4a581c4e3ef1a0508b739711c41 (patch) | |
tree | 42b583a99dfabaf21e6e61841201f113f8a601a9 /libupower-glib | |
parent | 8da188b30351a252de2405b09698dd61d53eb606 (diff) | |
download | upower-9b7ce3dea303f4a581c4e3ef1a0508b739711c41.tar.gz |
Replace use of G_TYPE_INSTANCE_GET_PRIVATE
G_TYPE_INSTANCE_GET_PRIVATE has been deprecated since glib version
2.58 and should be replaced with the xxx_get_instance_private (obj)
which is generated by G_ADD_PRIVATE.
Diffstat (limited to 'libupower-glib')
-rw-r--r-- | libupower-glib/up-client.c | 4 | ||||
-rw-r--r-- | libupower-glib/up-device.c | 4 | ||||
-rw-r--r-- | libupower-glib/up-history-item.c | 4 | ||||
-rw-r--r-- | libupower-glib/up-stats-item.c | 4 | ||||
-rw-r--r-- | libupower-glib/up-wakeup-item.c | 4 | ||||
-rw-r--r-- | libupower-glib/up-wakeups.c | 4 |
6 files changed, 6 insertions, 18 deletions
diff --git a/libupower-glib/up-client.c b/libupower-glib/up-client.c index 2309bd3..26a6af7 100644 --- a/libupower-glib/up-client.c +++ b/libupower-glib/up-client.c @@ -43,8 +43,6 @@ static void up_client_initable_iface_init (GInitableIface *iface); static void up_client_init (UpClient *client); static void up_client_finalize (GObject *object); -#define UP_CLIENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UP_TYPE_CLIENT, UpClientPrivate)) - /** * UpClientPrivate: * @@ -462,7 +460,7 @@ static gboolean up_client_initable_init (GInitable *initable, GCancellable *cancellable, GError **error) { UpClient *client = UP_CLIENT (initable); - client->priv = UP_CLIENT_GET_PRIVATE (client); + client->priv = up_client_get_instance_private (client); /* connect to main interface */ client->priv->proxy = up_exported_daemon_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, diff --git a/libupower-glib/up-device.c b/libupower-glib/up-device.c index 6a4a4ad..e21274d 100644 --- a/libupower-glib/up-device.c +++ b/libupower-glib/up-device.c @@ -44,8 +44,6 @@ static void up_device_class_init (UpDeviceClass *klass); static void up_device_init (UpDevice *device); static void up_device_finalize (GObject *object); -#define UP_DEVICE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UP_TYPE_DEVICE, UpDevicePrivate)) - /** * UpDevicePrivate: * @@ -1217,7 +1215,7 @@ value_free (GValue *value) static void up_device_init (UpDevice *device) { - device->priv = UP_DEVICE_GET_PRIVATE (device); + device->priv = up_device_get_instance_private (device); device->priv->offline_props = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, diff --git a/libupower-glib/up-history-item.c b/libupower-glib/up-history-item.c index 0fbefa6..685cc08 100644 --- a/libupower-glib/up-history-item.c +++ b/libupower-glib/up-history-item.c @@ -39,8 +39,6 @@ static void up_history_item_class_init (UpHistoryItemClass *klass); static void up_history_item_init (UpHistoryItem *history_item); static void up_history_item_finalize (GObject *object); -#define UP_HISTORY_ITEM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UP_TYPE_HISTORY_ITEM, UpHistoryItemPrivate)) - struct UpHistoryItemPrivate { gdouble value; @@ -329,7 +327,7 @@ up_history_item_class_init (UpHistoryItemClass *klass) static void up_history_item_init (UpHistoryItem *history_item) { - history_item->priv = UP_HISTORY_ITEM_GET_PRIVATE (history_item); + history_item->priv = up_history_item_get_instance_private (history_item); } /** diff --git a/libupower-glib/up-stats-item.c b/libupower-glib/up-stats-item.c index c0204bf..538a44a 100644 --- a/libupower-glib/up-stats-item.c +++ b/libupower-glib/up-stats-item.c @@ -38,8 +38,6 @@ static void up_stats_item_class_init (UpStatsItemClass *klass); static void up_stats_item_init (UpStatsItem *stats_item); static void up_stats_item_finalize (GObject *object); -#define UP_STATS_ITEM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UP_TYPE_STATS_ITEM, UpStatsItemPrivate)) - struct UpStatsItemPrivate { gdouble value; @@ -202,7 +200,7 @@ up_stats_item_class_init (UpStatsItemClass *klass) static void up_stats_item_init (UpStatsItem *stats_item) { - stats_item->priv = UP_STATS_ITEM_GET_PRIVATE (stats_item); + stats_item->priv = up_stats_item_get_instance_private (stats_item); } /** diff --git a/libupower-glib/up-wakeup-item.c b/libupower-glib/up-wakeup-item.c index 948e4a1..82c7c6f 100644 --- a/libupower-glib/up-wakeup-item.c +++ b/libupower-glib/up-wakeup-item.c @@ -38,8 +38,6 @@ static void up_wakeup_item_class_init (UpWakeupItemClass *klass); static void up_wakeup_item_init (UpWakeupItem *wakeup_item); static void up_wakeup_item_finalize (GObject *object); -#define UP_WAKEUP_ITEM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UP_TYPE_WAKEUP_ITEM, UpWakeupItemPrivate)) - struct UpWakeupItemPrivate { gboolean is_userspace; @@ -418,7 +416,7 @@ up_wakeup_item_class_init (UpWakeupItemClass *klass) static void up_wakeup_item_init (UpWakeupItem *wakeup_item) { - wakeup_item->priv = UP_WAKEUP_ITEM_GET_PRIVATE (wakeup_item); + wakeup_item->priv = up_wakeup_item_get_instance_private (wakeup_item); } /** diff --git a/libupower-glib/up-wakeups.c b/libupower-glib/up-wakeups.c index 630df82..20390ee 100644 --- a/libupower-glib/up-wakeups.c +++ b/libupower-glib/up-wakeups.c @@ -32,8 +32,6 @@ static void up_wakeups_class_init (UpWakeupsClass *klass); static void up_wakeups_init (UpWakeups *wakeups); static void up_wakeups_finalize (GObject *object); -#define UP_WAKEUPS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UP_TYPE_WAKEUPS, UpWakeupsPrivate)) - struct UpWakeupsPrivate { UpExportedWakeups *proxy; @@ -243,7 +241,7 @@ up_wakeups_init (UpWakeups *wakeups) { GError *error = NULL; - wakeups->priv = UP_WAKEUPS_GET_PRIVATE (wakeups); + wakeups->priv = up_wakeups_get_instance_private (wakeups); /* connect to main interface */ wakeups->priv->proxy = up_exported_wakeups_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, |