From 8c68fa0be51f9f12e971b01c6dc9c358a99cfb02 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sat, 19 May 2012 21:56:23 +0100 Subject: Added common module for glib compatibility --- common.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 common.c (limited to 'common.c') diff --git a/common.c b/common.c new file mode 100644 index 00000000..a015514d --- /dev/null +++ b/common.c @@ -0,0 +1,29 @@ +/* + * common.c + * + * Copyright (C) 2012 James Booth + * + * This file is part of Profanity. + * + * Profanity is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Profanity is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Profanity. If not, see . + * + */ + +#include + +void p_slist_free_full(GSList *items, GDestroyNotify free_func) +{ + g_slist_foreach (items, (GFunc) free_func, NULL); + g_slist_free (items); +} -- cgit 1.4.1-2-gfad0 /profani-tty/tree/themes/complex?id=e0bcaaf81fa93c9a258809bbe26859f0922654c7'>tree commit diff stats
blob: fd2825da5236aa3f65b7c14ef2c7c8c3d647ffb8 (plain) (blame)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51