[librest] lastfm-proxy-call: Use G_DECLARE_DERIVABLE_TYPE



commit f97662e2197e3139712b97a07a523da6c8fe9ba1
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Aug 4 14:01:38 2017 +0200

    lastfm-proxy-call: Use G_DECLARE_DERIVABLE_TYPE
    
    https://bugzilla.gnome.org/show_bug.cgi?id=785811

 rest-extras/lastfm-proxy-call.h |   25 +++----------------------
 1 files changed, 3 insertions(+), 22 deletions(-)
---
diff --git a/rest-extras/lastfm-proxy-call.h b/rest-extras/lastfm-proxy-call.h
index 1a1fefb..da4c7ad 100644
--- a/rest-extras/lastfm-proxy-call.h
+++ b/rest-extras/lastfm-proxy-call.h
@@ -28,39 +28,20 @@
 G_BEGIN_DECLS
 
 #define LASTFM_TYPE_PROXY_CALL lastfm_proxy_call_get_type()
-
-#define LASTFM_PROXY_CALL(obj) \
-  (G_TYPE_CHECK_INSTANCE_CAST ((obj), LASTFM_TYPE_PROXY_CALL, LastfmProxyCall))
-
-#define LASTFM_PROXY_CALL_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_CAST ((klass), LASTFM_TYPE_PROXY_CALL, LastfmProxyCallClass))
-
-#define LASTFM_IS_PROXY_CALL(obj) \
-  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LASTFM_TYPE_PROXY_CALL))
-
-#define LASTFM_IS_PROXY_CALL_CLASS(klass) \
-  (G_TYPE_CHECK_CLASS_TYPE ((klass), LASTFM_TYPE_PROXY_CALL))
-
-#define LASTFM_PROXY_CALL_GET_CLASS(obj) \
-  (G_TYPE_INSTANCE_GET_CLASS ((obj), LASTFM_TYPE_PROXY_CALL, LastfmProxyCallClass))
+G_DECLARE_DERIVABLE_TYPE (LastfmProxyCall, lastfm_proxy_call, LASTFM, PROXY_CALL, RestProxyCall)
 
 /**
  * LastfmProxyCall:
  *
  * #LastfmProxyCall has no publicly available members.
  */
-typedef struct {
-  RestProxyCall parent;
-} LastfmProxyCall;
 
-typedef struct {
+struct _LastfmProxyCallClass {
   RestProxyCallClass parent_class;
   /*< private >*/
   /* padding for future expansion */
   gpointer _padding_dummy[8];
-} LastfmProxyCallClass;
-
-GType lastfm_proxy_call_get_type (void);
+};
 
 G_END_DECLS
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]