summaryrefslogtreecommitdiffstats
path: root/src/gui_gtk_x11.c
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2023-08-28 21:29:13 +0200
committerChristian Brabandt <cb@256bit.org>2023-08-28 21:29:13 +0200
commitfe1463674c4c97388409a8c91dd525e7b7afb69e (patch)
tree424284687bf9655a5465e826694e93b262d46b85 /src/gui_gtk_x11.c
parent2ba9d2e14e3633c92a32abba2a12533f93fefbf5 (diff)
patch 9.0.1815: pango_coverage_unref() deprecated in pango > 1.51v9.0.1815
Problem: pango_coverage_unref() deprecated in pango > 1.51 Solution: use g_object_unref() instead closes: #12942 Free PangoCoverage with g_object_unref for Pango >= 1.52 pango_coverage_unref was declared deprecated in Pango 1.52.0 in favor of g_object_unref. Adjust the call when building against a new enough Pango to avoid the deprecation warning. Signed-off-by: James McCoy <jamessan@jamessan.com> Co-authored-by: James McCoy <jamessan@jamessan.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/gui_gtk_x11.c')
-rw-r--r--src/gui_gtk_x11.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index 1f8b2ebcc7..3f0cf8c5aa 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -4845,7 +4845,11 @@ is_cjk_font(PangoFontDescription *font_desc)
{
uc = (cjk_langs[i][0] == 'k') ? 0xAC00 : 0x4E00;
is_cjk = (pango_coverage_get(coverage, uc) == PANGO_COVERAGE_EXACT);
+#if PANGO_VERSION_CHECK(1, 52, 0)
+ g_object_unref(coverage);
+#else
pango_coverage_unref(coverage);
+#endif
}
}