[gnome-online-accounts/wip/rishi/port-to-g-declare: 6/7] rest-proxy: Use G_DECLARE_FINAL_TYPE
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts/wip/rishi/port-to-g-declare: 6/7] rest-proxy: Use G_DECLARE_FINAL_TYPE
- Date: Thu, 5 Dec 2019 19:12:52 +0000 (UTC)
commit 053488e15167eb280e9639303768029cd744f273
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Dec 5 19:34:41 2019 +0100
rest-proxy: Use G_DECLARE_FINAL_TYPE
src/goabackend/goarestproxy.c | 5 -----
src/goabackend/goarestproxy.h | 16 +++-------------
2 files changed, 3 insertions(+), 18 deletions(-)
---
diff --git a/src/goabackend/goarestproxy.c b/src/goabackend/goarestproxy.c
index e5d4bb5e..acece45b 100644
--- a/src/goabackend/goarestproxy.c
+++ b/src/goabackend/goarestproxy.c
@@ -26,11 +26,6 @@ struct _GoaRestProxy
RestProxy parent_instance;
};
-struct _GoaRestProxyClass
-{
- RestProxyClass parent_class;
-};
-
G_DEFINE_TYPE (GoaRestProxy, goa_rest_proxy, REST_TYPE_PROXY);
/* ---------------------------------------------------------------------------------------------------- */
diff --git a/src/goabackend/goarestproxy.h b/src/goabackend/goarestproxy.h
index 04af4267..09fb0762 100644
--- a/src/goabackend/goarestproxy.h
+++ b/src/goabackend/goarestproxy.h
@@ -27,20 +27,10 @@
G_BEGIN_DECLS
-#define GOA_TYPE_REST_PROXY (goa_rest_proxy_get_type ())
-
-#define GOA_REST_PROXY(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
- GOA_TYPE_REST_PROXY, GoaRestProxy))
-
-#define GOA_IS_REST_PROXY(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
- GOA_TYPE_REST_PROXY))
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (RestProxy, g_object_unref);
-typedef struct _GoaRestProxy GoaRestProxy;
-typedef struct _GoaRestProxyClass GoaRestProxyClass;
-
-GType goa_rest_proxy_get_type (void) G_GNUC_CONST;
+#define GOA_TYPE_REST_PROXY (goa_rest_proxy_get_type ())
+G_DECLARE_FINAL_TYPE (GoaRestProxy, goa_rest_proxy, GOA, REST_PROXY, RestProxy);
RestProxy *goa_rest_proxy_new (const gchar *url_format,
gboolean binding_required);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]