diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-05-06 04:34:41 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-05-06 04:34:41 +0800 |
commit | 1557095113a3c0f5baadcfb1e953d73762e5263e (patch) | |
tree | 6af706fb1f4f673120981e033768a09169544c11 /libempathy/empathy-contact.c | |
parent | 62828fac680bd53e0047d9ae2a281c864075c809 (diff) | |
download | gsoc2013-empathy-1557095113a3c0f5baadcfb1e953d73762e5263e.tar gsoc2013-empathy-1557095113a3c0f5baadcfb1e953d73762e5263e.tar.gz gsoc2013-empathy-1557095113a3c0f5baadcfb1e953d73762e5263e.tar.bz2 gsoc2013-empathy-1557095113a3c0f5baadcfb1e953d73762e5263e.tar.lz gsoc2013-empathy-1557095113a3c0f5baadcfb1e953d73762e5263e.tar.xz gsoc2013-empathy-1557095113a3c0f5baadcfb1e953d73762e5263e.tar.zst gsoc2013-empathy-1557095113a3c0f5baadcfb1e953d73762e5263e.zip |
Keep a priv pointer in the object struct instead of using G_TYPE_INSTANCE_GET_PRIVATE all the time.
svn path=/trunk/; revision=1082
Diffstat (limited to 'libempathy/empathy-contact.c')
-rw-r--r-- | libempathy/empathy-contact.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c index 639cd9388..19283cc72 100644 --- a/libempathy/empathy-contact.c +++ b/libempathy/empathy-contact.c @@ -38,11 +38,8 @@ #define DEBUG_FLAG EMPATHY_DEBUG_CONTACT #include "empathy-debug.h" -#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_CONTACT, EmpathyContactPriv)) - -typedef struct _EmpathyContactPriv EmpathyContactPriv; - -struct _EmpathyContactPriv { +#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyContact) +typedef struct { gchar *id; gchar *name; EmpathyAvatar *avatar; @@ -54,10 +51,8 @@ struct _EmpathyContactPriv { gboolean is_user; guint hash; EmpathyContactReady ready; -}; +} EmpathyContactPriv; -static void empathy_contact_class_init (EmpathyContactClass *class); -static void empathy_contact_init (EmpathyContact *contact); static void contact_finalize (GObject *object); static void contact_get_property (GObject *object, guint param_id, @@ -186,6 +181,10 @@ empathy_contact_class_init (EmpathyContactClass *class) static void empathy_contact_init (EmpathyContact *contact) { + EmpathyContactPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (contact, + EMPATHY_TYPE_CONTACT, EmpathyContactPriv); + + contact->priv = priv; } static void |