summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2015-10-13 15:00:30 +0100
committerRichard Hughes <richard@hughsie.com>2015-10-13 16:23:22 +0100
commit67ba1c8ec83cbc8f9776cbbf6f0dc7c50897e565 (patch)
tree17b001e40adb981aac9a277329f2ac8874ef0f8a /contrib
parent7999005038cbeaa35221bc7053b74c6cd1daca1b (diff)
downloadcolord-67ba1c8ec83cbc8f9776cbbf6f0dc7c50897e565.tar.gz
Use G_DECLARE_DERIVABLE_TYPE in libcolord
This gives us the g_autoptr() macros for free.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/colord-sane/cd-main.c4
-rw-r--r--contrib/session-helper/cd-main.c7
-rw-r--r--contrib/session-helper/cd-state.c1
3 files changed, 4 insertions, 8 deletions
diff --git a/contrib/colord-sane/cd-main.c b/contrib/colord-sane/cd-main.c
index 51c2c4e..d82955f 100644
--- a/contrib/colord-sane/cd-main.c
+++ b/contrib/colord-sane/cd-main.c
@@ -30,8 +30,6 @@
#include <dbus/dbus.h>
#include <colord/colord.h>
-#include "cd-cleanup.h"
-
typedef struct {
gchar *argv0;
CdClient *client;
@@ -101,7 +99,7 @@ cd_main_colord_create_device_cb (GObject *source_object,
{
CdClient *client = CD_CLIENT (source_object);
g_autoptr(GError) error = NULL;
- _cleanup_object_unref_ CdDevice *device = NULL;
+ g_autoptr(CdDevice) device = NULL;
/* get result */
device = cd_client_create_device_finish (client, res, &error);
diff --git a/contrib/session-helper/cd-main.c b/contrib/session-helper/cd-main.c
index c0dafa9..5c8ed07 100644
--- a/contrib/session-helper/cd-main.c
+++ b/contrib/session-helper/cd-main.c
@@ -29,7 +29,6 @@
#include <colord/colord.h>
-#include "cd-cleanup.h"
#include "cd-debug.h"
#include "cd-state.h"
#include "cd-session.h"
@@ -1029,7 +1028,7 @@ cd_main_set_profile_metadata (CdMainPrivate *priv, GError **error)
g_autoptr(GError) error_local = NULL;
g_autofree gchar *profile_fn = NULL;
g_autofree gchar *profile_path = NULL;
- _cleanup_object_unref_ CdIcc *icc = NULL;
+ g_autoptr(CdIcc) icc = NULL;
g_autoptr(GFile) file = NULL;
/* get profile */
@@ -1465,7 +1464,7 @@ cd_main_find_device (CdMainPrivate *priv,
{
gboolean ret;
g_autoptr(GError) error_local = NULL;
- _cleanup_object_unref_ CdDevice *device_tmp = NULL;
+ g_autoptr(CdDevice) device_tmp = NULL;
device_tmp = cd_client_find_device_sync (priv->client,
device_id,
@@ -1515,7 +1514,7 @@ cd_main_find_sensor (CdMainPrivate *priv,
{
gboolean ret;
g_autoptr(GError) error_local = NULL;
- _cleanup_object_unref_ CdSensor *sensor_tmp = NULL;
+ g_autoptr(CdSensor) sensor_tmp = NULL;
sensor_tmp = cd_client_find_sensor_sync (priv->client,
sensor_id,
diff --git a/contrib/session-helper/cd-state.c b/contrib/session-helper/cd-state.c
index 0fac698..11987a2 100644
--- a/contrib/session-helper/cd-state.c
+++ b/contrib/session-helper/cd-state.c
@@ -27,7 +27,6 @@
#include <signal.h>
#include <gio/gio.h>
-#include "cd-cleanup.h"
#include "cd-state.h"
#define CD_STATE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), CD_TYPE_STATE, CdStatePrivate))