* glibcompat.h: Define g_try_malloc as malloc for glib 1.2.x.

This commit is contained in:
Pavel Roskin 2003-10-15 07:05:24 +00:00
parent 5cb7bf73fd
commit bf5a5c4e04
2 changed files with 3 additions and 0 deletions

View File

@ -1,5 +1,7 @@
2003-10-15 Pavel Roskin <proski@gnu.org>
* glibcompat.h: Define g_try_malloc as malloc for glib 1.2.x.
* view.c (load_view_file): Use g_try_malloc() because the
failure to allcate memory is acceptable here.
Reported by Pavel S. Shirshov <pavelsh@mail.ru>

View File

@ -20,6 +20,7 @@
#if GLIB_MAJOR_VERSION < 2
gsize g_strlcpy (gchar *dest, const gchar *src, gsize dest_size);
#define g_try_malloc(x) malloc(x)
#endif /* GLIB_MAJOR_VERSION < 2 */
#endif /* !__MC_GLIBCOMPAT_H */