qulogic/pidgin

Fix inconsistent function export annotations

8 months ago, Elliott Sales de Andrade
b19ffc40278d
Parents 6e536023f78f
Children ba2a26d44c0e
Fix inconsistent function export annotations

The `G_DECLARE_*TYPE` macros create a function prototype for the `_get_type`
function, so a second declaration with `G_MODULE_EXPORT` causes an
inconsistency (which only MSVC seems to complain about.)

Testing Done:
Compiled on Windows, though only Bonjour.

Reviewed at https://reviews.imfreedom.org/r/2740/
--- a/libpurple/protocols/bonjour/bonjour.h Thu Oct 26 23:06:05 2023 -0500
+++ b/libpurple/protocols/bonjour/bonjour.h Thu Oct 26 23:14:04 2023 -0500
@@ -45,6 +45,8 @@
#define BONJOUR_DOMAIN (g_quark_from_static_string("bonjour"))
#define BONJOUR_TYPE_PROTOCOL (bonjour_protocol_get_type())
+
+G_MODULE_EXPORT
G_DECLARE_FINAL_TYPE(BonjourProtocol, bonjour_protocol, BONJOUR, PROTOCOL,
PurpleProtocol)
@@ -57,11 +59,6 @@
} BonjourData;
/**
- * Returns the GType for the BonjourProtocol object.
- */
-G_MODULE_EXPORT GType bonjour_protocol_get_type(void);
-
-/**
* This will always be username@machinename
*/
const char *bonjour_get_jid(PurpleAccount *account);
--- a/libpurple/protocols/gg/gg.h Thu Oct 26 23:06:05 2023 -0500
+++ b/libpurple/protocols/gg/gg.h Thu Oct 26 23:14:04 2023 -0500
@@ -43,6 +43,8 @@
#include "edisc.h"
#define GGP_TYPE_PROTOCOL (ggp_protocol_get_type())
+
+G_MODULE_EXPORT
G_DECLARE_FINAL_TYPE(GGPProtocol, ggp_protocol, GGP, PROTOCOL, PurpleProtocol)
typedef struct {
@@ -69,8 +71,6 @@
gboolean not_a_friend;
} ggp_buddy_data;
-G_MODULE_EXPORT GType ggp_protocol_get_type(void);
-
ggp_buddy_data * ggp_buddy_get_data(PurpleBuddy *buddy);
const gchar * ggp_get_imtoken(PurpleConnection *gc);