Thu, 07 Feb 2019 03:11:53 -0500
Use G_DEFINE_BOXED_TYPE in protocols.
--- a/libpurple/protocols/jabber/google/google_p2p.c Sat Jan 26 19:20:11 2019 +0000 +++ b/libpurple/protocols/jabber/google/google_p2p.c Thu Feb 07 03:11:53 2019 -0500 @@ -89,18 +89,8 @@ g_free(candidate->password); } -GType -jingle_google_p2p_candidate_get_type(void) -{ - static GType type = 0; - - if (type == 0) { - type = g_boxed_type_register_static("JingleGoogleP2PCandidate", - (GBoxedCopyFunc)jingle_google_p2p_candidate_copy, - (GBoxedFreeFunc)jingle_google_p2p_candidate_free); - } - return type; -} +G_DEFINE_BOXED_TYPE(JingleGoogleP2PCandidate, jingle_google_p2p_candidate, + jingle_google_p2p_candidate_copy, jingle_google_p2p_candidate_free) JingleGoogleP2PCandidate * jingle_google_p2p_candidate_new(const gchar *id, guint generation,
--- a/libpurple/protocols/jabber/jingle/iceudp.c Sat Jan 26 19:20:11 2019 +0000 +++ b/libpurple/protocols/jabber/jingle/iceudp.c Thu Feb 07 03:11:53 2019 -0500 @@ -96,18 +96,8 @@ g_free(candidate->password); } -GType -jingle_iceudp_candidate_get_type() -{ - static GType type = 0; - - if (type == 0) { - type = g_boxed_type_register_static("JingleIceUdpCandidate", - (GBoxedCopyFunc)jingle_iceudp_candidate_copy, - (GBoxedFreeFunc)jingle_iceudp_candidate_free); - } - return type; -} +G_DEFINE_BOXED_TYPE(JingleIceUdpCandidate, jingle_iceudp_candidate, + jingle_iceudp_candidate_copy, jingle_iceudp_candidate_free) JingleIceUdpCandidate * jingle_iceudp_candidate_new(const gchar *id,
--- a/libpurple/protocols/jabber/jingle/rawudp.c Sat Jan 26 19:20:11 2019 +0000 +++ b/libpurple/protocols/jabber/jingle/rawudp.c Thu Feb 07 03:11:53 2019 -0500 @@ -80,18 +80,8 @@ g_free(candidate->ip); } -GType -jingle_rawudp_candidate_get_type() -{ - static GType type = 0; - - if (type == 0) { - type = g_boxed_type_register_static("JingleRawUdpCandidate", - (GBoxedCopyFunc)jingle_rawudp_candidate_copy, - (GBoxedFreeFunc)jingle_rawudp_candidate_free); - } - return type; -} +G_DEFINE_BOXED_TYPE(JingleRawUdpCandidate, jingle_rawudp_candidate, + jingle_rawudp_candidate_copy, jingle_rawudp_candidate_free) JingleRawUdpCandidate * jingle_rawudp_candidate_new(const gchar *id, guint generation, guint component, const gchar *ip, guint port)