diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2018-05-31 09:42:56 +1200 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2018-05-31 09:42:56 +1200 |
commit | cb1071b9ab6bf743d7c51545841dfadcbfe7ec9c (patch) | |
tree | 2a78da77f51e286d10e3b8f8ee95c7f6fd3e4f52 /libupower-glib/up-client.h | |
parent | 0e6cc20ca922a2985a43ec342eeeefe21082c348 (diff) | |
download | upower-cb1071b9ab6bf743d7c51545841dfadcbfe7ec9c.tar.gz |
lib: Add a new version of up_client_get_devices which unrefs contents
The existing function didn't set the free function on the GPtrArray.
This means a libupower user can easily make a mistake in the reference
counting of the array contents.
Diffstat (limited to 'libupower-glib/up-client.h')
-rw-r--r-- | libupower-glib/up-client.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libupower-glib/up-client.h b/libupower-glib/up-client.h index 5b9af3c..2342a48 100644 --- a/libupower-glib/up-client.h +++ b/libupower-glib/up-client.h @@ -79,7 +79,8 @@ UpDevice * up_client_get_display_device (UpClient *client); char * up_client_get_critical_action (UpClient *client); /* accessors */ -GPtrArray *up_client_get_devices (UpClient *client); +GPtrArray *up_client_get_devices (UpClient *client) G_DEPRECATED_FOR(up_client_get_devices2); +GPtrArray *up_client_get_devices2 (UpClient *client); const gchar *up_client_get_daemon_version (UpClient *client); gboolean up_client_get_lid_is_closed (UpClient *client); gboolean up_client_get_lid_is_present (UpClient *client); |