summaryrefslogtreecommitdiff
path: root/pango/pango-ot-info.c
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2011-04-30 11:49:04 +0100
committerJavier Jardón <jjardon@gnome.org>2011-04-30 12:59:13 +0100
commit57ebe449bf7a14397548905ad006b093b28bb876 (patch)
treef60ef6f58c4cebde2086eebb0770e86daf7499c0 /pango/pango-ot-info.c
parentcdf841adb0bddcd790a2230d04749a680d827015 (diff)
downloadpango-57ebe449bf7a14397548905ad006b093b28bb876.tar.gz
pango/pango-ot-info.c: Use G_DEFINE_TYPE
Diffstat (limited to 'pango/pango-ot-info.c')
-rw-r--r--pango/pango-ot-info.c37
1 files changed, 6 insertions, 31 deletions
diff --git a/pango/pango-ot-info.c b/pango/pango-ot-info.c
index 51aa50de..67c78709 100644
--- a/pango/pango-ot-info.c
+++ b/pango/pango-ot-info.c
@@ -25,46 +25,21 @@
#include "pango-impl-utils.h"
#include FT_TRUETYPE_TABLES_H
-static void pango_ot_info_class_init (GObjectClass *object_class);
static void pango_ot_info_finalize (GObject *object);
static void synthesize_class_def (PangoOTInfo *info);
-static GObjectClass *parent_class;
+G_DEFINE_TYPE (PangoOTInfo, pango_ot_info, G_TYPE_OBJECT);
-GType
-pango_ot_info_get_type (void)
+static void
+pango_ot_info_init (PangoOTInfo *self)
{
- static GType object_type = 0;
-
- if (G_UNLIKELY (!object_type))
- {
- const GTypeInfo object_info =
- {
- sizeof (PangoOTInfoClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc)pango_ot_info_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (PangoOTInfo),
- 0, /* n_preallocs */
- NULL, /* init */
- NULL, /* value_table */
- };
-
- object_type = g_type_register_static (G_TYPE_OBJECT,
- I_("PangoOTInfo"),
- &object_info, 0);
- }
-
- return object_type;
}
static void
-pango_ot_info_class_init (GObjectClass *object_class)
+pango_ot_info_class_init (PangoOTInfoClass *klass)
{
- parent_class = g_type_class_peek_parent (object_class);
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = pango_ot_info_finalize;
}
@@ -77,7 +52,7 @@ pango_ot_info_finalize (GObject *object)
if (info->hb_face)
hb_face_destroy (info->hb_face);
- parent_class->finalize (object);
+ G_OBJECT_CLASS (pango_ot_info_parent_class)->finalize (object);
}
static void