aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-contact-factory.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-05-06 04:34:41 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-05-06 04:34:41 +0800
commit1557095113a3c0f5baadcfb1e953d73762e5263e (patch)
tree6af706fb1f4f673120981e033768a09169544c11 /libempathy/empathy-contact-factory.c
parent62828fac680bd53e0047d9ae2a281c864075c809 (diff)
downloadgsoc2013-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-factory.c')
-rw-r--r--libempathy/empathy-contact-factory.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/libempathy/empathy-contact-factory.c b/libempathy/empathy-contact-factory.c
index e9469bac9..2169e7108 100644
--- a/libempathy/empathy-contact-factory.c
+++ b/libempathy/empathy-contact-factory.c
@@ -24,15 +24,10 @@
#include "empathy-contact-factory.h"
#include "empathy-utils.h"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \
- EMPATHY_TYPE_CONTACT_FACTORY, EmpathyContactFactoryPriv))
-
-struct _EmpathyContactFactoryPriv {
+#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyContactFactory)
+typedef struct {
GHashTable *accounts;
-};
-
-static void empathy_contact_factory_class_init (EmpathyContactFactoryClass *klass);
-static void empathy_contact_factory_init (EmpathyContactFactory *factory);
+} EmpathyContactFactoryPriv;
G_DEFINE_TYPE (EmpathyContactFactory, empathy_contact_factory, G_TYPE_OBJECT);
@@ -153,8 +148,10 @@ empathy_contact_factory_class_init (EmpathyContactFactoryClass *klass)
static void
empathy_contact_factory_init (EmpathyContactFactory *factory)
{
- EmpathyContactFactoryPriv *priv = GET_PRIV (factory);
+ EmpathyContactFactoryPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (factory,
+ EMPATHY_TYPE_CONTACT_FACTORY, EmpathyContactFactoryPriv);
+ factory->priv = priv;
priv->accounts = g_hash_table_new_full (empathy_account_hash,
empathy_account_equal,
g_object_unref,