aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-module.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-02-25 23:20:41 +0800
committerMilan Crha <mcrha@redhat.com>2011-02-25 23:20:41 +0800
commit1301cf02efdacd20fb5ce3e2554ae15b8f146e8a (patch)
tree8d5f3985a82ec7d330af27ee0a29a79a2f0ecfa3 /e-util/e-module.c
parent1a4be6c521d674c4a60e54203521e2721b81b921 (diff)
downloadgsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.tar.gz
gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.tar.zst
gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.zip
Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly
Diffstat (limited to 'e-util/e-module.c')
-rw-r--r--e-util/e-module.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/e-util/e-module.c b/e-util/e-module.c
index 7b4801df47..56add2b27f 100644
--- a/e-util/e-module.c
+++ b/e-util/e-module.c
@@ -35,10 +35,6 @@
/* This is the symbol we call when unloading a module. */
#define UNLOAD_SYMBOL "e_module_unload"
-#define E_MODULE_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_MODULE, EModulePrivate))
-
struct _EModulePrivate {
GModule *module;
gchar *filename;
@@ -105,7 +101,7 @@ module_finalize (GObject *object)
{
EModulePrivate *priv;
- priv = E_MODULE_GET_PRIVATE (object);
+ priv = E_MODULE (object)->priv;
g_free (priv->filename);
@@ -119,7 +115,7 @@ module_load (GTypeModule *type_module)
EModulePrivate *priv;
gpointer symbol;
- priv = E_MODULE_GET_PRIVATE (type_module);
+ priv = E_MODULE (type_module)->priv;
g_return_val_if_fail (priv->filename != NULL, FALSE);
priv->module = g_module_open (priv->filename, 0);
@@ -155,7 +151,7 @@ module_unload (GTypeModule *type_module)
{
EModulePrivate *priv;
- priv = E_MODULE_GET_PRIVATE (type_module);
+ priv = E_MODULE (type_module)->priv;
priv->unload (type_module);
@@ -203,7 +199,7 @@ e_module_class_init (EModuleClass *class)
static void
e_module_init (EModule *module)
{
- module->priv = E_MODULE_GET_PRIVATE (module);
+ module->priv = G_TYPE_INSTANCE_GET_PRIVATE (module, E_TYPE_MODULE, EModulePrivate);
}
/**