@@ -42,7 +42,7 @@ struct MpSerializerPrivate
4242};
4343
4444
45- G_DEFINE_TYPE (MpSerializer , mp_serializer , G_TYPE_OBJECT );
45+ G_DEFINE_TYPE_WITH_PRIVATE (MpSerializer , mp_serializer , G_TYPE_OBJECT );
4646
4747MpSerializer *
4848mp_serializer_new (MpDisplayFormat format , int base , int trailing_digits )
@@ -559,8 +559,6 @@ mp_serializer_class_init(MpSerializerClass *klass)
559559 object_class -> get_property = mp_serializer_get_property ;
560560 object_class -> set_property = mp_serializer_set_property ;
561561
562- g_type_class_add_private (klass , sizeof (MpSerializerPrivate ));
563-
564562 g_object_class_install_property (object_class ,
565563 PROP_SHOW_THOUSANDS_SEPARATORS ,
566564 g_param_spec_boolean ("show-thousands-separators" ,
@@ -597,7 +595,7 @@ static void
597595mp_serializer_init (MpSerializer * serializer )
598596{
599597 gchar * radix , * tsep ;
600- serializer -> priv = G_TYPE_INSTANCE_GET_PRIVATE ( serializer , mp_serializer_get_type (), MpSerializerPrivate );
598+ serializer -> priv = mp_serializer_get_instance_private ( serializer );
601599
602600 radix = nl_langinfo (RADIXCHAR );
603601 serializer -> priv -> radix = radix ? g_utf8_get_char (g_locale_to_utf8 (radix , -1 , NULL , NULL , NULL )) : '.' ;
0 commit comments