diff options
author | Mike Ruprecht <cmaiku@gmail.com> | 2018-12-14 18:51:17 -0600 |
---|---|---|
committer | Mike Ruprecht <cmaiku@gmail.com> | 2018-12-14 18:51:17 -0600 |
commit | 9f48413a67730c536aee44a581617378872e9b83 (patch) | |
tree | 416d79dfc81f411b04e26c96512275561b6c44b6 | |
parent | 6e6e356cb6577724b221a3deb68f3413570d413c (diff) | |
download | pidgin-9f48413a67730c536aee44a581617378872e9b83.tar.gz |
Use G_BEGIN_DECLS and G_END_DECLS instead of raw extern "C"
This patch replaces direct usage of 'extern "C"', guarded with
_cplusplus, with GLib's G_BEGIN_DECLS and G_END_DECLS.
-rw-r--r-- | libpurple/protocols/oscar/oscar.h | 8 | ||||
-rw-r--r-- | libpurple/version.h.in | 8 | ||||
-rw-r--r-- | libpurple/win32/libc_interface.h | 8 | ||||
-rw-r--r-- | libpurple/win32/libc_internal.h | 10 | ||||
-rw-r--r-- | libpurple/win32/win32dep.h | 9 | ||||
-rw-r--r-- | pidgin/plugins/ticker/gtkticker.h | 9 | ||||
-rw-r--r-- | pidgin/win32/untar.h | 8 |
7 files changed, 14 insertions, 46 deletions
diff --git a/libpurple/protocols/oscar/oscar.h b/libpurple/protocols/oscar/oscar.h index c85f5360d5..5e46181685 100644 --- a/libpurple/protocols/oscar/oscar.h +++ b/libpurple/protocols/oscar/oscar.h @@ -75,9 +75,7 @@ typedef guint32 aim_snacid_t; #include "snactypes.h" -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS #define FAIM_SNAC_HASH_SIZE 16 @@ -1375,8 +1373,6 @@ void oscar_free_name_data(struct name_data *data); void oscar_init_account_options(PurpleProtocol *protocol, gboolean is_icq); -#ifdef __cplusplus -} -#endif +G_END_DECLS #endif /* _OSCAR_H_ */ diff --git a/libpurple/version.h.in b/libpurple/version.h.in index 602a47dc80..8678133b2c 100644 --- a/libpurple/version.h.in +++ b/libpurple/version.h.in @@ -54,9 +54,7 @@ ((y) < PURPLE_MINOR_VERSION || \ ((y) == PURPLE_MINOR_VERSION && (z) <= PURPLE_MICRO_VERSION))) -#ifdef __cplusplus -extern "C" { -#endif +G_BEGIN_DECLS /** * purple_version_check: @@ -99,9 +97,7 @@ extern const guint purple_minor_version; */ extern const guint purple_micro_version; -#ifdef __cplusplus -} -#endif +G_END_DECLS #endif /* _PURPLE_VERSION_H_ */ diff --git a/libpurple/win32/libc_interface.h b/libpurple/win32/libc_interface.h index 011d178d51..148bee5d23 100644 --- a/libpurple/win32/libc_interface.h +++ b/libpurple/win32/libc_interface.h @@ -33,9 +33,7 @@ #include <glib.h> #include "glibcompat.h" -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ +G_BEGIN_DECLS #ifdef _MSC_VER #define S_IRUSR S_IREAD @@ -156,8 +154,6 @@ g_rename( oldname, newname ) #define localtime_r( time, resultp ) \ wpurple_localtime_r( time, resultp ) -#ifdef __cplusplus -} -#endif /* __cplusplus */ +G_END_DECLS #endif /* _LIBC_INTERFACE_H_ */ diff --git a/libpurple/win32/libc_internal.h b/libpurple/win32/libc_internal.h index 427582b715..904dcbc8cf 100644 --- a/libpurple/win32/libc_internal.h +++ b/libpurple/win32/libc_internal.h @@ -24,10 +24,7 @@ #define _LIBC_INTERNAL_ #include <glib.h> - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ +G_BEGIN_DECLS /* sys/socket.h */ int wpurple_socket(int domain, int style, int protocol); @@ -114,9 +111,6 @@ int wpurple_write(int fd, const void *buf, unsigned int size); int wpurple_close(int fd); int wpurple_gethostname(char *name, size_t size); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ +G_END_DECLS #endif /* _LIBC_INTERNAL_ */ diff --git a/libpurple/win32/win32dep.h b/libpurple/win32/win32dep.h index 41fcfcfa6c..68752cbfb5 100644 --- a/libpurple/win32/win32dep.h +++ b/libpurple/win32/win32dep.h @@ -32,10 +32,7 @@ #include "wpurpleerror.h" #include "libc_interface.h" - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ +G_BEGIN_DECLS /* the winapi headers don't yet have winhttp.h, so we use the struct from msdn directly */ typedef struct { @@ -79,9 +76,7 @@ const char *wpurple_sysconf_dir(void); void wpurple_init(void); void wpurple_cleanup(void); -#ifdef __cplusplus -} -#endif /* __cplusplus */ +G_END_DECLS #endif /* _WIN32DEP_H_ */ diff --git a/pidgin/plugins/ticker/gtkticker.h b/pidgin/plugins/ticker/gtkticker.h index 4b2b2d8204..9831e1dd8c 100644 --- a/pidgin/plugins/ticker/gtkticker.h +++ b/pidgin/plugins/ticker/gtkticker.h @@ -30,9 +30,7 @@ #include "plugins.h" -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ +G_BEGIN_DECLS #define GTK_TYPE_TICKER (gtk_ticker_get_type()) #define GTK_TICKER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_TICKER, GtkTicker)) @@ -94,9 +92,6 @@ guint gtk_ticker_get_scootch (GtkTicker *ticker); void gtk_ticker_start_scroll (GtkTicker *ticker); void gtk_ticker_stop_scroll (GtkTicker *ticker); -#ifdef __cplusplus -} -#endif /* __cplusplus */ - +G_END_DECLS #endif /* __GTK_TICKER_H__ */ diff --git a/pidgin/win32/untar.h b/pidgin/win32/untar.h index 54ad9ca007..da4e39e4f8 100644 --- a/pidgin/win32/untar.h +++ b/pidgin/win32/untar.h @@ -8,9 +8,7 @@ #ifndef _UNTAR_H_ #define _UNTAR_H_ -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ +G_BEGIN_DECLS typedef enum { UNTAR_LISTING = (1 << 0), @@ -23,8 +21,6 @@ typedef enum { int untar(const char *filename, const char *destdir, untar_opt options); -#ifdef __cplusplus -} -#endif /* __cplusplus */ +G_END_DECLS #endif |