[glib] Drop fallback code for versions we don’t support

We require Glib 2.30.0, so drop checks for older versions.
This commit is contained in:
Khaled Hosny committed 2025-07-02 20:14:51 +03:00
1 parent 826b7c132b
commit af1b9acc27
5 files changed
-33

No files matched your search

-8
View File
@@ -127,11 +127,7 @@ hb_glib_unicode_compose (hb_unicode_funcs_t *ufuncs HB_UNUSED,
hb_codepoint_t *ab,
void *user_data HB_UNUSED)
{
#if GLIB_CHECK_VERSION(2,29,12)
return g_unichar_compose (a, b, ab);
#else
return false;
#endif
}
static hb_bool_t
@@ -141,11 +137,7 @@ hb_glib_unicode_decompose (hb_unicode_funcs_t *ufuncs HB_UNUSED,
hb_codepoint_t *b,
void *user_data HB_UNUSED)
{
#if GLIB_CHECK_VERSION(2,29,12)
return g_unichar_decompose (ab, a, b);
#else
return false;
#endif
}
-6
View File
@@ -31,12 +31,6 @@
/* g++ didn't like older gtype.h gcc-only code path. */
#include <glib.h>
#if !GLIB_CHECK_VERSION(2,29,16)
#undef __GNUC__
#undef __GNUC_MINOR__
#define __GNUC__ 2
#define __GNUC_MINOR__ 6
#endif
#include "hb-gobject.h"
-6
View File
@@ -51,12 +51,6 @@
/* g++ didn't like older gtype.h gcc-only code path. */
#include <glib.h>
#if !GLIB_CHECK_VERSION(2,29,16)
#undef __GNUC__
#undef __GNUC_MINOR__
#define __GNUC__ 2
#define __GNUC_MINOR__ 6
#endif
#include "hb-gobject.h"
-9
View File
@@ -127,19 +127,10 @@ hb_test_normalize_path (const char *path)
}
#if GLIB_CHECK_VERSION(2,25,12)
typedef GTestFunc hb_test_func_t;
typedef GTestDataFunc hb_test_data_func_t;
typedef GTestFixtureFunc hb_test_fixture_func_t;
#else
typedef void (*hb_test_func_t) (void);
typedef void (*hb_test_data_func_t) (gconstpointer user_data);
typedef void (*hb_test_fixture_func_t) (gpointer fixture, gconstpointer user_data);
#endif
#if !GLIB_CHECK_VERSION(2,30,0)
#define g_test_fail() g_error("Test failed")
#endif
#ifndef g_assert_true
#define g_assert_true g_assert
#endif
-4
View File
@@ -76,11 +76,7 @@ struct view_cairo_t : view_options_t, output_options_t<>
helper_cairo_line_t &line = g_array_index (lines, helper_cairo_line_t, i);
line.finish ();
}
#if GLIB_CHECK_VERSION (2, 22, 0)
g_array_unref (lines);
#else
g_array_free (lines, TRUE);
#endif
}
protected: