* glibcompat.h: Provide replacement for g_slist_delete_link().

Reported by Pavel S. Shirshov <pavelsh@mail.ru>
This commit is contained in:
Pavel Roskin 2003-11-20 20:25:33 +00:00
parent 30afc48694
commit 99e6b0f929
2 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2003-11-20 Pavel Roskin <proski@gnu.org>
* glibcompat.h: Provide replacement for g_slist_delete_link().
Reported by Pavel S. Shirshov <pavelsh@mail.ru>
2003-11-20 Andrew V. Samoilov <sav@bcs.zp.ua>
* util.c (load_mc_home_file): Eliminate g_strdup_printf().

View File

@ -19,9 +19,19 @@
#define __MC_GLIBCOMPAT_H
#if GLIB_MAJOR_VERSION < 2
gsize g_strlcpy (gchar *dest, const gchar *src, gsize dest_size);
#define g_try_malloc(x) malloc(x)
#define g_try_realloc(x) realloc(x)
static inline GSList *
g_slist_delete_link (GSList *list, GSList *link)
{
list = g_slist_remove_link (list, link);
g_slist_free_1 (link);
return list;
}
#endif /* GLIB_MAJOR_VERSION < 2 */
#endif /* !__MC_GLIBCOMPAT_H */