summaryrefslogtreecommitdiff
path: root/pango/pango-ot-ruleset.c
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2011-04-30 11:53:57 +0100
committerJavier Jardón <jjardon@gnome.org>2011-04-30 12:59:14 +0100
commitc8aed76aefe5b2dc81420cf9498df831ff2a0d65 (patch)
tree7ff10048abf38e68c49c98332e976182808213d0 /pango/pango-ot-ruleset.c
parent57ebe449bf7a14397548905ad006b093b28bb876 (diff)
downloadpango-c8aed76aefe5b2dc81420cf9498df831ff2a0d65.tar.gz
ngo/pango-ot-ruleset.c: Use G_DEFINE_TYPE
Diffstat (limited to 'pango/pango-ot-ruleset.c')
-rw-r--r--pango/pango-ot-ruleset.c39
1 files changed, 4 insertions, 35 deletions
diff --git a/pango/pango-ot-ruleset.c b/pango/pango-ot-ruleset.c
index b5e27959..81306a77 100644
--- a/pango/pango-ot-ruleset.c
+++ b/pango/pango-ot-ruleset.c
@@ -24,45 +24,14 @@
#include "pango-ot-private.h"
#include "pango-impl-utils.h"
-static void pango_ot_ruleset_class_init (GObjectClass *object_class);
-static void pango_ot_ruleset_init (PangoOTRuleset *ruleset);
static void pango_ot_ruleset_finalize (GObject *object);
-static GObjectClass *parent_class;
-
-GType
-pango_ot_ruleset_get_type (void)
-{
- static GType object_type = 0;
-
- if (G_UNLIKELY (!object_type))
- {
- const GTypeInfo object_info =
- {
- sizeof (PangoOTRulesetClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc)pango_ot_ruleset_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (PangoOTRuleset),
- 0, /* n_preallocs */
- (GInstanceInitFunc)pango_ot_ruleset_init,
- NULL /* value_table */
- };
-
- object_type = g_type_register_static (G_TYPE_OBJECT,
- I_("PangoOTRuleset"),
- &object_info, 0);
- }
-
- return object_type;
-}
+G_DEFINE_TYPE (PangoOTRuleset, pango_ot_ruleset, G_TYPE_OBJECT);
static void
-pango_ot_ruleset_class_init (GObjectClass *object_class)
+pango_ot_ruleset_class_init (PangoOTRulesetClass *klass)
{
- parent_class = g_type_class_peek_parent (object_class);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = pango_ot_ruleset_finalize;
}
@@ -86,7 +55,7 @@ pango_ot_ruleset_finalize (GObject *object)
if (ruleset->info)
g_object_remove_weak_pointer (G_OBJECT (ruleset->info), (gpointer *)(void *)&ruleset->info);
- parent_class->finalize (object);
+ G_OBJECT_CLASS (pango_ot_ruleset_parent_class)->finalize (object);
}
/**