Mon, 21 Aug 2023 23:39:11 -0500
IRCv3: work around some warnings when generating the gir file
Testing Done:
I generated the gir with and without this and diffed the versions and there were no changes other than that the warnings were gone.
I suspect this is a bug somewhere in either `g-ir-scanner` or `GObject` but this gets rid of the warning for now which will stop others from wasting time on it for the time being.
Reviewed at https://reviews.imfreedom.org/r/2582/
| libpurple/protocols/ircv3/purpleircv3connection.c | file | annotate | diff | comparison | revisions |
--- a/libpurple/protocols/ircv3/purpleircv3connection.c Mon Aug 21 23:36:42 2023 -0500 +++ b/libpurple/protocols/ircv3/purpleircv3connection.c Mon Aug 21 23:39:11 2023 -0500 @@ -571,7 +571,19 @@ *****************************************************************************/ void purple_ircv3_connection_register(GPluginNativePlugin *plugin) { + GObjectClass *hack = NULL; + purple_ircv3_connection_register_type(G_TYPE_MODULE(plugin)); + + /* Without this hack we get some warnings about no reference on this type + * when generating the gir file. However, there are no changes to the + * generated gir file with or without this hack, so this is purely to get + * rid of the warnings. + * + * - GK 2023-08-21 + */ + hack = g_type_class_ref(purple_ircv3_connection_get_type()); + g_type_class_unref(hack); } GCancellable *