Welcome to mirror list, hosted at ThFree Co, Russian Federation.

02-glibcompat.patch « patches - github.com/dequis/purple-facebook.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4669b77ca0554cbc44cb7d3a58d85d2351efea42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
diff -r 1852eb9052a0 libpurple/glibcompat.h
--- a/libpurple/glibcompat.h	Fri Dec 25 15:20:41 2015 -0500
+++ b/libpurple/glibcompat.h	Fri Dec 25 15:49:07 2015 -0500
@@ -61,6 +61,33 @@
 	return FALSE;
 }
 
+#if !GLIB_CHECK_VERSION(2, 32, 0)
+
+static inline GByteArray * g_byte_array_new_take(guint8 *data, gsize len)
+{
+	GByteArray *array;
+
+	array = g_byte_array_new();
+	g_byte_array_append(array, data, len);
+	g_free(data);
+
+	return array;
+}
+
+static inline void g_queue_free_full(GQueue *queue, GDestroyNotify free_func)
+{
+	g_queue_foreach(queue, (GFunc)free_func, NULL);
+	g_queue_free(queue);
+}
+
+#if !GLIB_CHECK_VERSION(2, 30, 0)
+
+#define G_VALUE_INIT {0, {{0}}}
+
+#endif /* < 2.30.0 */
+
+#endif /* < 2.32.0 */
+
 #endif /* < 2.36.0 */