summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-03-18 23:20:12 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-03-18 23:24:30 -0400
commit69a7dde587b14038cb6009608ed03618f0b3cbfd (patch)
tree8251cc99a2acf3b904e8387d432bdb6d3da5ebf4
parentf05be99189d928c3ebfeb8c6b6fded34cdca6671 (diff)
downloadpango-69a7dde587b14038cb6009608ed03618f0b3cbfd.tar.gz
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.
-rw-r--r--pango/pango-impl-utils.h8
1 files changed, 8 insertions, 0 deletions
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__ */