diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-05-03 15:04:05 +0100 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2012-05-03 15:23:38 +0100 |
commit | 2f377dab66ef074497ff0630508535716d369cb7 (patch) | |
tree | e328498fe35f39ee6062d2ec5ee728167b973f24 /telepathy-glib/connection-contact-info.c | |
parent | fd81730d9c9b79ddd165fb6b0f02268b72e0b811 (diff) | |
download | telepathy-glib-2f377dab66ef074497ff0630508535716d369cb7.tar.gz |
Use G_DEFINE_BOXED_TYPE for every boxed type except TpIntset
TpIntset is a bit weird because of backwards compatibility with TpIntSet,
so we can only replace that one on next.
Reviewed-by: Xavier Claessens <xavier.claessens@collabora.co.uk>
Diffstat (limited to 'telepathy-glib/connection-contact-info.c')
-rw-r--r-- | telepathy-glib/connection-contact-info.c | 60 |
1 files changed, 8 insertions, 52 deletions
diff --git a/telepathy-glib/connection-contact-info.c b/telepathy-glib/connection-contact-info.c index 07b213aa2..3349c8bdf 100644 --- a/telepathy-glib/connection-contact-info.c +++ b/telepathy-glib/connection-contact-info.c @@ -143,20 +143,9 @@ tp_contact_info_field_spec_free (TpContactInfoFieldSpec *self) * * Since: 0.11.7 */ -GType -tp_contact_info_field_spec_get_type (void) -{ - static GType type = 0; - if (G_UNLIKELY (type == 0)) - { - type = g_boxed_type_register_static (g_intern_static_string ("TpContactInfoFieldSpec"), - (GBoxedCopyFunc) tp_contact_info_field_spec_copy, - (GBoxedFreeFunc) tp_contact_info_field_spec_free); - } - - return type; -} +G_DEFINE_BOXED_TYPE (TpContactInfoFieldSpec, tp_contact_info_field_spec, + tp_contact_info_field_spec_copy, tp_contact_info_field_spec_free) /** * tp_contact_info_spec_list_copy: (skip) @@ -204,20 +193,9 @@ tp_contact_info_spec_list_free (GList *list) * * Since: 0.11.7 */ -GType -tp_contact_info_spec_list_get_type (void) -{ - static GType type = 0; - if (G_UNLIKELY (type == 0)) - { - type = g_boxed_type_register_static (g_intern_static_string ("TpContactInfoSpecList"), - (GBoxedCopyFunc) tp_contact_info_spec_list_copy, - (GBoxedFreeFunc) tp_contact_info_spec_list_free); - } - - return type; -} +G_DEFINE_BOXED_TYPE (TpContactInfoSpecList, tp_contact_info_spec_list, + tp_contact_info_spec_list_copy, tp_contact_info_spec_list_free) /** * TpContactInfoField: @@ -323,20 +301,9 @@ tp_contact_info_field_free (TpContactInfoField *self) * * Since: 0.11.7 */ -GType -tp_contact_info_field_get_type (void) -{ - static GType type = 0; - if (G_UNLIKELY (type == 0)) - { - type = g_boxed_type_register_static (g_intern_static_string ("TpContactInfoField"), - (GBoxedCopyFunc) tp_contact_info_field_copy, - (GBoxedFreeFunc) tp_contact_info_field_free); - } - - return type; -} +G_DEFINE_BOXED_TYPE (TpContactInfoField, tp_contact_info_field, + tp_contact_info_field_copy, tp_contact_info_field_free) /** * tp_contact_info_list_copy: (skip) @@ -384,20 +351,9 @@ tp_contact_info_list_free (GList *list) * * Since: 0.11.7 */ -GType -tp_contact_info_list_get_type (void) -{ - static GType type = 0; - if (G_UNLIKELY (type == 0)) - { - type = g_boxed_type_register_static (g_intern_static_string ("TpContactInfoList"), - (GBoxedCopyFunc) tp_contact_info_list_copy, - (GBoxedFreeFunc) tp_contact_info_list_free); - } - - return type; -} +G_DEFINE_BOXED_TYPE (TpContactInfoList, tp_contact_info_list, + tp_contact_info_list_copy, tp_contact_info_list_free) /** * TP_CONNECTION_FEATURE_CONTACT_INFO: |