mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 12:32:40 +03:00
* glibcompat.h: Provide replacement for g_slist_delete_link().
Reported by Pavel S. Shirshov <pavelsh@mail.ru>
This commit is contained in:
parent
30afc48694
commit
99e6b0f929
@ -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().
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user