Mercurial > vim
comparison src/gui_gtk_x11.c @ 33049:0dc386dbf7b7 v9.0.1815
patch 9.0.1815: pango_coverage_unref() deprecated in pango > 1.51
Commit: https://github.com/vim/vim/commit/fe1463674c4c97388409a8c91dd525e7b7afb69e
Author: James McCoy <jamessan@jamessan.com>
Date: Mon Aug 28 21:29:13 2023 +0200
patch 9.0.1815: pango_coverage_unref() deprecated in pango > 1.51
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>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 28 Aug 2023 21:45:04 +0200 |
parents | 695b50472e85 |
children | def9fc5c92d1 |
comparison
equal
deleted
inserted
replaced
33048:c55961cb3149 | 33049:0dc386dbf7b7 |
---|---|
4843 | 4843 |
4844 if (coverage != NULL) | 4844 if (coverage != NULL) |
4845 { | 4845 { |
4846 uc = (cjk_langs[i][0] == 'k') ? 0xAC00 : 0x4E00; | 4846 uc = (cjk_langs[i][0] == 'k') ? 0xAC00 : 0x4E00; |
4847 is_cjk = (pango_coverage_get(coverage, uc) == PANGO_COVERAGE_EXACT); | 4847 is_cjk = (pango_coverage_get(coverage, uc) == PANGO_COVERAGE_EXACT); |
4848 #if PANGO_VERSION_CHECK(1, 52, 0) | |
4849 g_object_unref(coverage); | |
4850 #else | |
4848 pango_coverage_unref(coverage); | 4851 pango_coverage_unref(coverage); |
4852 #endif | |
4849 } | 4853 } |
4850 } | 4854 } |
4851 | 4855 |
4852 g_object_unref(font); | 4856 g_object_unref(font); |
4853 | 4857 |