From 69a7dde587b14038cb6009608ed03618f0b3cbfd Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 18 Mar 2021 23:20:12 -0400 Subject: Add compatibility shim for g_memdup2() We don't necessarily want to depend on a newer version of GLib, given that we're not really using g_memdup() in the wrong way. --- pango/pango-impl-utils.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'pango/pango-impl-utils.h') diff --git a/pango/pango-impl-utils.h b/pango/pango-impl-utils.h index 92a1168e..d2420321 100644 --- a/pango/pango-impl-utils.h +++ b/pango/pango-impl-utils.h @@ -201,6 +201,14 @@ pango_get_ignorable_size (gunichar ch, return nick; } +/* Backward compatibility shim, to avoid bumping up the minimum + * required version of GLib; most of our uses of g_memdup() are + * safe, and those that aren't have been fixed + */ +#if !GLIB_CHECK_VERSION (2, 67, 3) +# define g_memdup2(mem,size) g_memdup((mem),(size)) +#endif + G_END_DECLS #endif /* __PANGO_IMPL_UTILS_H__ */ -- cgit v1.2.1