libpurple/glibcompat.h

Mon, 11 Nov 2019 21:31:35 -0600

author
Gary Kramlich <grim@reaperworld.com>
date
Mon, 11 Nov 2019 21:31:35 -0600
branch
release-2.x.y
changeset 40185
7a975763d3b6
parent 40174
43e0ebb91028
child 40755
fb2056ce3c58
permissions
-rw-r--r--

Add implementations for g_hash_table_contains and g_queue_free_full when compiling against glib < 2.32.0

40173
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /**
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * @file glibcompat.h Compatibility for many glib versions.
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * @ingroup core
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 */
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 /* purple
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 *
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 * Purple is the legal property of its developers, whose names are too numerous
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 * to list here. Please refer to the COPYRIGHT file distributed with this
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * source distribution.
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 *
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * This program is free software; you can redistribute it and/or modify
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 * it under the terms of the GNU General Public License as published by
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 * the Free Software Foundation; either version 2 of the License, or
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * (at your option) any later version.
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 *
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 * This program is distributed in the hope that it will be useful,
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 * GNU General Public License for more details.
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 *
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22 * You should have received a copy of the GNU General Public License
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 * along with this program; if not, write to the Free Software
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25 */
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 #ifndef PURPLE_GLIBCOMPAT_H
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 #define PURPLE_GLIBCOMPAT_H
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 #include <glib.h>
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32 #if !GLIB_CHECK_VERSION(2,32,0)
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33 # define G_GNUC_BEGIN_IGNORE_DEPRECATIONS
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34 # define G_GNUC_END_IGNORE_DEPRECATIONS
40185
7a975763d3b6 Add implementations for g_hash_table_contains and g_queue_free_full when compiling against glib < 2.32.0
Gary Kramlich <grim@reaperworld.com>
parents: 40174
diff changeset
35
7a975763d3b6 Add implementations for g_hash_table_contains and g_queue_free_full when compiling against glib < 2.32.0
Gary Kramlich <grim@reaperworld.com>
parents: 40174
diff changeset
36 void g_queue_free_full(GQueue *queue, GDestroyNotify free_func);
7a975763d3b6 Add implementations for g_hash_table_contains and g_queue_free_full when compiling against glib < 2.32.0
Gary Kramlich <grim@reaperworld.com>
parents: 40174
diff changeset
37
7a975763d3b6 Add implementations for g_hash_table_contains and g_queue_free_full when compiling against glib < 2.32.0
Gary Kramlich <grim@reaperworld.com>
parents: 40174
diff changeset
38 gboolean g_hash_table_contains (GHashTable *hash_table, gconstpointer key);
7a975763d3b6 Add implementations for g_hash_table_contains and g_queue_free_full when compiling against glib < 2.32.0
Gary Kramlich <grim@reaperworld.com>
parents: 40174
diff changeset
39
40173
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40 #endif /* !GLIB_CHECK_VERSION(2,32,0) */
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42 #ifdef __clang__
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
44 #undef G_GNUC_BEGIN_IGNORE_DEPRECATIONS
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
45 #define G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46 _Pragma ("clang diagnostic push") \
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47 _Pragma ("clang diagnostic ignored \"-Wdeprecated-declarations\"")
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
48
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49 #undef G_GNUC_END_IGNORE_DEPRECATIONS
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50 #define G_GNUC_END_IGNORE_DEPRECATIONS \
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51 _Pragma ("clang diagnostic pop")
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
53 #endif /* __clang__ */
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55 #endif /* PURPLE_GLIBCOMPAT_H */
dc5e8cca7434 Create a glibcompat.h to define G_GNUC_(BEGIN,END)_IGNORE_DEPRECATIONS which was added in 2.32.0 but we only require 2.16.0
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56

mercurial