mirror of
https://github.com/profanity-im/profanity.git
synced 2025-01-03 14:57:42 -05:00
Added backwards compatible g_list_free_full for glib < 2.28
This commit is contained in:
parent
e1f4465dc7
commit
b3d49f2a3c
@ -72,6 +72,13 @@ p_slist_free_full(GSList *items, GDestroyNotify free_func)
|
|||||||
g_slist_free (items);
|
g_slist_free (items);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
p_list_free_full(GList *items, GDestroyNotify free_func)
|
||||||
|
{
|
||||||
|
g_list_foreach (items, (GFunc) free_func, NULL);
|
||||||
|
g_list_free (items);
|
||||||
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
create_dir(char *name)
|
create_dir(char *name)
|
||||||
{
|
{
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#if !GLIB_CHECK_VERSION(2,28,0)
|
#if !GLIB_CHECK_VERSION(2,28,0)
|
||||||
#define g_slist_free_full(items, free_func) p_slist_free_full(items, free_func)
|
#define g_slist_free_full(items, free_func) p_slist_free_full(items, free_func)
|
||||||
|
#define g_list_free_full(items, free_func) p_list_free_full(items, free_func)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !GLIB_CHECK_VERSION(2,30,0)
|
#if !GLIB_CHECK_VERSION(2,30,0)
|
||||||
@ -72,6 +73,7 @@ typedef enum {
|
|||||||
|
|
||||||
gchar* p_utf8_substring(const gchar *str, glong start_pos, glong end_pos);
|
gchar* p_utf8_substring(const gchar *str, glong start_pos, glong end_pos);
|
||||||
void p_slist_free_full(GSList *items, GDestroyNotify free_func);
|
void p_slist_free_full(GSList *items, GDestroyNotify free_func);
|
||||||
|
void p_list_free_full(GList *items, GDestroyNotify free_func);
|
||||||
gboolean create_dir(char *name);
|
gboolean create_dir(char *name);
|
||||||
gboolean mkdir_recursive(const char *dir);
|
gboolean mkdir_recursive(const char *dir);
|
||||||
char * str_replace(const char *string, const char *substr,
|
char * str_replace(const char *string, const char *substr,
|
||||||
|
@ -27,6 +27,7 @@
|
|||||||
|
|
||||||
#include "jid.h"
|
#include "jid.h"
|
||||||
#include "config/account.h"
|
#include "config/account.h"
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
ProfAccount*
|
ProfAccount*
|
||||||
account_new(const gchar * const name, const gchar * const jid,
|
account_new(const gchar * const name, const gchar * const jid,
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#include "contact.h"
|
#include "contact.h"
|
||||||
|
#include "common.h"
|
||||||
#include "jid.h"
|
#include "jid.h"
|
||||||
#include "tools/autocomplete.h"
|
#include "tools/autocomplete.h"
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include "xmpp/mock_xmpp.h"
|
#include "xmpp/mock_xmpp.h"
|
||||||
|
|
||||||
#include "muc.h"
|
#include "muc.h"
|
||||||
|
#include "common.h"
|
||||||
|
|
||||||
#include "command/commands.h"
|
#include "command/commands.h"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user