summaryrefslogtreecommitdiff
path: root/pango/pangofc-font.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2018-08-30 16:31:18 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2018-08-30 16:36:30 +0100
commit0bd0be4a563cbc227ef3b1cd4c7a53927816c474 (patch)
tree4cba249b7f25deee2690620f543a51e6c10c6109 /pango/pangofc-font.c
parent7e7f76622ffe25edf3a8d4988b2e9d04654093bd (diff)
downloadpango-0bd0be4a563cbc227ef3b1cd4c7a53927816c474.tar.gz
Drop deprecated instance private data API
GLib 2.58 deprecated g_type_class_add_private(), at long last. Use the G_ADD_PRIVATE macro, and the generated instance private data getter function.
Diffstat (limited to 'pango/pangofc-font.c')
-rw-r--r--pango/pangofc-font.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/pango/pangofc-font.c b/pango/pangofc-font.c
index c35b77ee..5a48e782 100644
--- a/pango/pangofc-font.c
+++ b/pango/pangofc-font.c
@@ -94,7 +94,8 @@ static PangoFontDescription *pango_fc_font_describe_absolute (PangoFont *
#define PANGO_FC_FONT_LOCK_FACE(font) (PANGO_FC_FONT_GET_CLASS (font)->lock_face (font))
#define PANGO_FC_FONT_UNLOCK_FACE(font) (PANGO_FC_FONT_GET_CLASS (font)->unlock_face (font))
-G_DEFINE_ABSTRACT_TYPE (PangoFcFont, pango_fc_font, PANGO_TYPE_FONT)
+G_DEFINE_ABSTRACT_TYPE_WITH_CODE (PangoFcFont, pango_fc_font, PANGO_TYPE_FONT,
+ G_ADD_PRIVATE (PangoFcFont))
static void
pango_fc_font_class_init (PangoFcFontClass *class)
@@ -129,16 +130,12 @@ pango_fc_font_class_init (PangoFcFontClass *class)
PANGO_TYPE_FC_FONT_MAP,
G_PARAM_READWRITE |
G_PARAM_STATIC_STRINGS));
-
- g_type_class_add_private (object_class, sizeof (PangoFcFontPrivate));
}
static void
pango_fc_font_init (PangoFcFont *fcfont)
{
- fcfont->priv = G_TYPE_INSTANCE_GET_PRIVATE (fcfont,
- PANGO_TYPE_FC_FONT,
- PangoFcFontPrivate);
+ fcfont->priv = pango_fc_font_get_instance_private (fcfont);
}
static void