Wed, 29 Jan 2014 00:50:20 +0530
Include glib.h before using GLIB_CHECK_VERSION
|
33368
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
1 | /* pidgin |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
2 | * |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
3 | * Pidgin is the legal property of its developers, whose names are too numerous |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
4 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
5 | * source distribution. |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
6 | * |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
7 | * This program is free software; you can redistribute it and/or modify |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
8 | * it under the terms of the GNU General Public License as published by |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
9 | * the Free Software Foundation; either version 2 of the License, or |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
10 | * (at your option) any later version. |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
11 | * |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
12 | * This program is distributed in the hope that it will be useful, |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
15 | * GNU General Public License for more details. |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
16 | * |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
17 | * You should have received a copy of the GNU General Public License |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
18 | * along with this program; if not, write to the Free Software |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
20 | */ |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
21 | #ifndef _PIDGINGLIBCOMPAT_H_ |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
22 | #define _PIDGINGLIBCOMPAT_H_ |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
23 | |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
24 | /* This file is internal to Pidgin. Do not use! |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
25 | * Also, any public API should not depend on this file. |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
26 | */ |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
27 | |
|
34462
d51759c13fde
Clang: replace HAVE_CLANG with __clang__
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
34456
diff
changeset
|
28 | #ifdef __clang__ |
|
34456
d69aa7d3530c
Clang warnings: gnutls, gnome keyring and G_GNUC_*_IGNORE_DEPRECATIONS
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33890
diff
changeset
|
29 | |
|
d69aa7d3530c
Clang warnings: gnutls, gnome keyring and G_GNUC_*_IGNORE_DEPRECATIONS
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33890
diff
changeset
|
30 | #undef G_GNUC_BEGIN_IGNORE_DEPRECATIONS |
|
d69aa7d3530c
Clang warnings: gnutls, gnome keyring and G_GNUC_*_IGNORE_DEPRECATIONS
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33890
diff
changeset
|
31 | #define G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ |
|
d69aa7d3530c
Clang warnings: gnutls, gnome keyring and G_GNUC_*_IGNORE_DEPRECATIONS
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33890
diff
changeset
|
32 | _Pragma ("clang diagnostic push") \ |
|
d69aa7d3530c
Clang warnings: gnutls, gnome keyring and G_GNUC_*_IGNORE_DEPRECATIONS
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33890
diff
changeset
|
33 | _Pragma ("clang diagnostic ignored \"-Wdeprecated-declarations\"") |
|
d69aa7d3530c
Clang warnings: gnutls, gnome keyring and G_GNUC_*_IGNORE_DEPRECATIONS
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33890
diff
changeset
|
34 | |
|
d69aa7d3530c
Clang warnings: gnutls, gnome keyring and G_GNUC_*_IGNORE_DEPRECATIONS
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33890
diff
changeset
|
35 | #undef G_GNUC_END_IGNORE_DEPRECATIONS |
|
d69aa7d3530c
Clang warnings: gnutls, gnome keyring and G_GNUC_*_IGNORE_DEPRECATIONS
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33890
diff
changeset
|
36 | #define G_GNUC_END_IGNORE_DEPRECATIONS \ |
|
d69aa7d3530c
Clang warnings: gnutls, gnome keyring and G_GNUC_*_IGNORE_DEPRECATIONS
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33890
diff
changeset
|
37 | _Pragma ("clang diagnostic pop") |
|
d69aa7d3530c
Clang warnings: gnutls, gnome keyring and G_GNUC_*_IGNORE_DEPRECATIONS
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33890
diff
changeset
|
38 | |
|
34462
d51759c13fde
Clang: replace HAVE_CLANG with __clang__
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
34456
diff
changeset
|
39 | #endif /* __clang__ */ |
|
d51759c13fde
Clang: replace HAVE_CLANG with __clang__
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
34456
diff
changeset
|
40 | |
|
34456
d69aa7d3530c
Clang warnings: gnutls, gnome keyring and G_GNUC_*_IGNORE_DEPRECATIONS
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
33890
diff
changeset
|
41 | |
|
35299
dc0a29ff7087
Include glib.h before using GLIB_CHECK_VERSION
Ankit Vani <a@nevitus.org>
parents:
35195
diff
changeset
|
42 | #include <glib.h> |
|
dc0a29ff7087
Include glib.h before using GLIB_CHECK_VERSION
Ankit Vani <a@nevitus.org>
parents:
35195
diff
changeset
|
43 | |
|
33838
3c73956dbeca
Ignore some deprecations.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33593
diff
changeset
|
44 | #if !GLIB_CHECK_VERSION(2, 32, 0) |
|
3c73956dbeca
Ignore some deprecations.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33593
diff
changeset
|
45 | |
|
35190
5986ee34c476
libpurple: Fix build and warnings with glib 2.24
Ankit Vani <a@nevitus.org>
parents:
35081
diff
changeset
|
46 | #include <glib-object.h> |
|
35194
9a0203562da5
pidgin: Fix build and warnings with glib 2.24
Ankit Vani <a@nevitus.org>
parents:
35190
diff
changeset
|
47 | #include <string.h> |
|
9a0203562da5
pidgin: Fix build and warnings with glib 2.24
Ankit Vani <a@nevitus.org>
parents:
35190
diff
changeset
|
48 | |
|
33838
3c73956dbeca
Ignore some deprecations.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33593
diff
changeset
|
49 | #define G_GNUC_BEGIN_IGNORE_DEPRECATIONS |
|
3c73956dbeca
Ignore some deprecations.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33593
diff
changeset
|
50 | #define G_GNUC_END_IGNORE_DEPRECATIONS |
|
3c73956dbeca
Ignore some deprecations.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33593
diff
changeset
|
51 | |
|
35195
7f7d87c04ab1
Add g_signal_handlers_disconnect_by_data to glibcompat.h and use it
Ankit Vani <a@nevitus.org>
parents:
35194
diff
changeset
|
52 | #define g_signal_handlers_disconnect_by_data(instance, data) \ |
|
7f7d87c04ab1
Add g_signal_handlers_disconnect_by_data to glibcompat.h and use it
Ankit Vani <a@nevitus.org>
parents:
35194
diff
changeset
|
53 | g_signal_handlers_disconnect_matched((instance), G_SIGNAL_MATCH_DATA, \ |
|
7f7d87c04ab1
Add g_signal_handlers_disconnect_by_data to glibcompat.h and use it
Ankit Vani <a@nevitus.org>
parents:
35194
diff
changeset
|
54 | 0, 0, NULL, NULL, (data)) |
|
7f7d87c04ab1
Add g_signal_handlers_disconnect_by_data to glibcompat.h and use it
Ankit Vani <a@nevitus.org>
parents:
35194
diff
changeset
|
55 | |
|
33883
8a0d96bd9cf4
Replace deprecated g_thread_create with g_thread_try_new
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33882
diff
changeset
|
56 | static inline GThread * g_thread_try_new(const gchar *name, GThreadFunc func, |
|
8a0d96bd9cf4
Replace deprecated g_thread_create with g_thread_try_new
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33882
diff
changeset
|
57 | gpointer data, GError **error) |
|
8a0d96bd9cf4
Replace deprecated g_thread_create with g_thread_try_new
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33882
diff
changeset
|
58 | { |
|
8a0d96bd9cf4
Replace deprecated g_thread_create with g_thread_try_new
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33882
diff
changeset
|
59 | return g_thread_create(func, data, TRUE, error); |
|
8a0d96bd9cf4
Replace deprecated g_thread_create with g_thread_try_new
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33882
diff
changeset
|
60 | } |
|
8a0d96bd9cf4
Replace deprecated g_thread_create with g_thread_try_new
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33882
diff
changeset
|
61 | |
|
35194
9a0203562da5
pidgin: Fix build and warnings with glib 2.24
Ankit Vani <a@nevitus.org>
parents:
35190
diff
changeset
|
62 | #if !GLIB_CHECK_VERSION(2, 30, 0) |
|
9a0203562da5
pidgin: Fix build and warnings with glib 2.24
Ankit Vani <a@nevitus.org>
parents:
35190
diff
changeset
|
63 | |
|
9a0203562da5
pidgin: Fix build and warnings with glib 2.24
Ankit Vani <a@nevitus.org>
parents:
35190
diff
changeset
|
64 | static inline gchar *g_utf8_substring(const gchar *str, glong start_pos, |
|
9a0203562da5
pidgin: Fix build and warnings with glib 2.24
Ankit Vani <a@nevitus.org>
parents:
35190
diff
changeset
|
65 | glong end_pos) |
|
9a0203562da5
pidgin: Fix build and warnings with glib 2.24
Ankit Vani <a@nevitus.org>
parents:
35190
diff
changeset
|
66 | { |
|
9a0203562da5
pidgin: Fix build and warnings with glib 2.24
Ankit Vani <a@nevitus.org>
parents:
35190
diff
changeset
|
67 | gchar *start = g_utf8_offset_to_pointer(str, start_pos); |
|
9a0203562da5
pidgin: Fix build and warnings with glib 2.24
Ankit Vani <a@nevitus.org>
parents:
35190
diff
changeset
|
68 | gchar *end = g_utf8_offset_to_pointer(start, end_pos - start_pos); |
|
9a0203562da5
pidgin: Fix build and warnings with glib 2.24
Ankit Vani <a@nevitus.org>
parents:
35190
diff
changeset
|
69 | gchar *out = g_malloc(end - start + 1); |
|
9a0203562da5
pidgin: Fix build and warnings with glib 2.24
Ankit Vani <a@nevitus.org>
parents:
35190
diff
changeset
|
70 | |
|
9a0203562da5
pidgin: Fix build and warnings with glib 2.24
Ankit Vani <a@nevitus.org>
parents:
35190
diff
changeset
|
71 | memcpy(out, start, end - start); |
|
9a0203562da5
pidgin: Fix build and warnings with glib 2.24
Ankit Vani <a@nevitus.org>
parents:
35190
diff
changeset
|
72 | out[end - start] = 0; |
|
9a0203562da5
pidgin: Fix build and warnings with glib 2.24
Ankit Vani <a@nevitus.org>
parents:
35190
diff
changeset
|
73 | |
|
9a0203562da5
pidgin: Fix build and warnings with glib 2.24
Ankit Vani <a@nevitus.org>
parents:
35190
diff
changeset
|
74 | return out; |
|
9a0203562da5
pidgin: Fix build and warnings with glib 2.24
Ankit Vani <a@nevitus.org>
parents:
35190
diff
changeset
|
75 | } |
|
9a0203562da5
pidgin: Fix build and warnings with glib 2.24
Ankit Vani <a@nevitus.org>
parents:
35190
diff
changeset
|
76 | |
|
33368
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
77 | #if !GLIB_CHECK_VERSION(2, 28, 0) |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
78 | |
|
33467
5d9c3ec722d6
Better compatibility with old glib versions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33369
diff
changeset
|
79 | static inline gint64 g_get_monotonic_time(void) |
|
5d9c3ec722d6
Better compatibility with old glib versions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33369
diff
changeset
|
80 | { |
|
5d9c3ec722d6
Better compatibility with old glib versions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33369
diff
changeset
|
81 | GTimeVal time_s; |
|
5d9c3ec722d6
Better compatibility with old glib versions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33369
diff
changeset
|
82 | |
|
5d9c3ec722d6
Better compatibility with old glib versions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33369
diff
changeset
|
83 | g_get_current_time(&time_s); |
|
5d9c3ec722d6
Better compatibility with old glib versions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33369
diff
changeset
|
84 | |
|
5d9c3ec722d6
Better compatibility with old glib versions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33369
diff
changeset
|
85 | return ((gint64)time_s.tv_sec << 32) | time_s.tv_usec; |
|
5d9c3ec722d6
Better compatibility with old glib versions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33369
diff
changeset
|
86 | } |
|
5d9c3ec722d6
Better compatibility with old glib versions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33369
diff
changeset
|
87 | |
|
33368
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
88 | static inline void g_list_free_full(GList *list, GDestroyNotify free_func) |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
89 | { |
|
33467
5d9c3ec722d6
Better compatibility with old glib versions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33369
diff
changeset
|
90 | g_list_foreach(list, (GFunc)free_func, NULL); |
|
33368
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
91 | g_list_free(list); |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
92 | } |
|
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
93 | |
|
33369
4a43f6a6326b
Fix again, refs #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33368
diff
changeset
|
94 | static inline void g_slist_free_full(GSList *list, GDestroyNotify free_func) |
|
4a43f6a6326b
Fix again, refs #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33368
diff
changeset
|
95 | { |
|
33467
5d9c3ec722d6
Better compatibility with old glib versions
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33369
diff
changeset
|
96 | g_slist_foreach(list, (GFunc)free_func, NULL); |
|
33369
4a43f6a6326b
Fix again, refs #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33368
diff
changeset
|
97 | g_slist_free(list); |
|
4a43f6a6326b
Fix again, refs #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33368
diff
changeset
|
98 | } |
|
4a43f6a6326b
Fix again, refs #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33368
diff
changeset
|
99 | |
|
35073
46b7a39e45ec
Added g_object_notify_by_pspec to glibcompat.h
Ankit Vani <a@nevitus.org>
parents:
34462
diff
changeset
|
100 | #if !GLIB_CHECK_VERSION(2, 26, 0) |
|
46b7a39e45ec
Added g_object_notify_by_pspec to glibcompat.h
Ankit Vani <a@nevitus.org>
parents:
34462
diff
changeset
|
101 | |
|
35190
5986ee34c476
libpurple: Fix build and warnings with glib 2.24
Ankit Vani <a@nevitus.org>
parents:
35081
diff
changeset
|
102 | typedef struct stat GStatBuf; |
|
5986ee34c476
libpurple: Fix build and warnings with glib 2.24
Ankit Vani <a@nevitus.org>
parents:
35081
diff
changeset
|
103 | |
|
35073
46b7a39e45ec
Added g_object_notify_by_pspec to glibcompat.h
Ankit Vani <a@nevitus.org>
parents:
34462
diff
changeset
|
104 | static inline void g_object_notify_by_pspec(GObject *object, GParamSpec *pspec) |
|
46b7a39e45ec
Added g_object_notify_by_pspec to glibcompat.h
Ankit Vani <a@nevitus.org>
parents:
34462
diff
changeset
|
105 | { |
|
46b7a39e45ec
Added g_object_notify_by_pspec to glibcompat.h
Ankit Vani <a@nevitus.org>
parents:
34462
diff
changeset
|
106 | g_object_notify(object, g_param_spec_get_name(pspec)); |
|
46b7a39e45ec
Added g_object_notify_by_pspec to glibcompat.h
Ankit Vani <a@nevitus.org>
parents:
34462
diff
changeset
|
107 | } |
|
46b7a39e45ec
Added g_object_notify_by_pspec to glibcompat.h
Ankit Vani <a@nevitus.org>
parents:
34462
diff
changeset
|
108 | |
|
35081
eda7bae766d4
Added g_object_class_install_properties to glibcompat.h
Ankit Vani <a@nevitus.org>
parents:
35073
diff
changeset
|
109 | static inline void g_object_class_install_properties(GObjectClass *oclass, |
|
eda7bae766d4
Added g_object_class_install_properties to glibcompat.h
Ankit Vani <a@nevitus.org>
parents:
35073
diff
changeset
|
110 | guint n_pspecs, GParamSpec **pspecs) |
|
eda7bae766d4
Added g_object_class_install_properties to glibcompat.h
Ankit Vani <a@nevitus.org>
parents:
35073
diff
changeset
|
111 | { |
|
35190
5986ee34c476
libpurple: Fix build and warnings with glib 2.24
Ankit Vani <a@nevitus.org>
parents:
35081
diff
changeset
|
112 | guint i; |
|
35081
eda7bae766d4
Added g_object_class_install_properties to glibcompat.h
Ankit Vani <a@nevitus.org>
parents:
35073
diff
changeset
|
113 | for (i = 1; i < n_pspecs; ++i) |
|
eda7bae766d4
Added g_object_class_install_properties to glibcompat.h
Ankit Vani <a@nevitus.org>
parents:
35073
diff
changeset
|
114 | g_object_class_install_property(oclass, i, pspecs[i]); |
|
eda7bae766d4
Added g_object_class_install_properties to glibcompat.h
Ankit Vani <a@nevitus.org>
parents:
35073
diff
changeset
|
115 | } |
|
eda7bae766d4
Added g_object_class_install_properties to glibcompat.h
Ankit Vani <a@nevitus.org>
parents:
35073
diff
changeset
|
116 | |
|
35073
46b7a39e45ec
Added g_object_notify_by_pspec to glibcompat.h
Ankit Vani <a@nevitus.org>
parents:
34462
diff
changeset
|
117 | #endif /* < 2.26.0 */ |
|
46b7a39e45ec
Added g_object_notify_by_pspec to glibcompat.h
Ankit Vani <a@nevitus.org>
parents:
34462
diff
changeset
|
118 | |
|
33882
29a7df06f410
Fix a warning for glib 2.36 and g_type_init
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33838
diff
changeset
|
119 | #endif /* < 2.28.0 */ |
|
33368
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
120 | |
|
35194
9a0203562da5
pidgin: Fix build and warnings with glib 2.24
Ankit Vani <a@nevitus.org>
parents:
35190
diff
changeset
|
121 | #endif /* < 2.30.0 */ |
|
9a0203562da5
pidgin: Fix build and warnings with glib 2.24
Ankit Vani <a@nevitus.org>
parents:
35190
diff
changeset
|
122 | |
|
33882
29a7df06f410
Fix a warning for glib 2.36 and g_type_init
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
33838
diff
changeset
|
123 | #endif /* < 2.32.0 */ |
|
33838
3c73956dbeca
Ignore some deprecations.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
33593
diff
changeset
|
124 | |
|
33368
6aa16fdab83f
Fix compilation of older distros. Fixes #15310
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents:
diff
changeset
|
125 | #endif /* _PIDGINGLIBCOMPAT_H_ */ |