diff options
author | Matthias Clasen <mclasen@redhat.com> | 2022-11-17 14:16:37 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-11-17 22:49:56 -0500 |
commit | ebe6d5225218749bdef13039291fc6c10daf16a6 (patch) | |
tree | d6a831bc39a7dba64b01f015a6d7b159c6f85e3c | |
parent | 60aaf38f39fcc7a7feea84f1228ae91388bbb965 (diff) | |
download | gtk+-ebe6d5225218749bdef13039291fc6c10daf16a6.tar.gz |
Drop redundant glib version checks
We require GLib 2.72 now.
-rw-r--r-- | gdk/broadway/broadway-server.c | 4 | ||||
-rw-r--r-- | gdk/broadway/gdksurface-broadway.c | 4 | ||||
-rw-r--r-- | gdk/gdkprivate.h | 12 | ||||
-rw-r--r-- | modules/printbackends/gtkprintbackendcups.c | 4 | ||||
-rw-r--r-- | testsuite/gtk/calendar.c | 4 | ||||
-rw-r--r-- | testsuite/gtk/flattenlistmodel.c | 2 | ||||
-rw-r--r-- | testsuite/gtk/multiselection.c | 2 | ||||
-rw-r--r-- | testsuite/gtk/slicelistmodel.c | 2 | ||||
-rw-r--r-- | testsuite/gtk/sortlistmodel.c | 2 | ||||
-rw-r--r-- | testsuite/gtk/timsort.c | 4 | ||||
-rw-r--r-- | testsuite/reftests/gtk-reftest.c | 6 | ||||
-rw-r--r-- | tools/updateiconcache.c | 4 |
12 files changed, 0 insertions, 50 deletions
diff --git a/gdk/broadway/broadway-server.c b/gdk/broadway/broadway-server.c index b90c849f94..37b1eb23f5 100644 --- a/gdk/broadway/broadway-server.c +++ b/gdk/broadway/broadway-server.c @@ -36,10 +36,6 @@ #include <string.h> #endif -#if !GLIB_CHECK_VERSION (2, 67, 3) -# define g_memdup2(mem,size) g_memdup((mem), (size)) -#endif - typedef struct { int id; guint32 tag; diff --git a/gdk/broadway/gdksurface-broadway.c b/gdk/broadway/gdksurface-broadway.c index a29b5f2601..9dc5bb8e7f 100644 --- a/gdk/broadway/gdksurface-broadway.c +++ b/gdk/broadway/gdksurface-broadway.c @@ -47,10 +47,6 @@ #include <stdio.h> #include <string.h> -#if !GLIB_CHECK_VERSION (2, 67, 3) -# define g_memdup2(mem,size) g_memdup((mem), (size)) -#endif - /* Forward declarations */ static void gdk_broadway_surface_finalize (GObject *object); diff --git a/gdk/gdkprivate.h b/gdk/gdkprivate.h index c2174875e6..0f37cb0d8b 100644 --- a/gdk/gdkprivate.h +++ b/gdk/gdkprivate.h @@ -16,21 +16,9 @@ PangoDirection gdk_unichar_direction (gunichar ch) G_GNUC_CONST; PangoDirection gdk_find_base_dir (const char *text, int len); -/* 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 - void gdk_source_set_static_name_by_id (guint tag, const char *name); -#if !GLIB_CHECK_VERSION(2, 69, 1) -#define g_source_set_static_name(source, name) g_source_set_name ((source), (name)) -#endif - #ifndef I_ #define I_(string) g_intern_static_string (string) #endif diff --git a/modules/printbackends/gtkprintbackendcups.c b/modules/printbackends/gtkprintbackendcups.c index e0398bb1d4..878e073741 100644 --- a/modules/printbackends/gtkprintbackendcups.c +++ b/modules/printbackends/gtkprintbackendcups.c @@ -89,10 +89,6 @@ typedef struct _GtkPrintBackendCupsClass GtkPrintBackendCupsClass; #define _CUPS_MAP_ATTR_INT(attr, v, a) {if (!g_ascii_strcasecmp (attr->name, (a))) v = attr->values[0].integer;} #define _CUPS_MAP_ATTR_STR(attr, v, a) {if (!g_ascii_strcasecmp (attr->name, (a))) v = attr->values[0].string.text;} -#if !GLIB_CHECK_VERSION (2, 67, 3) -# define g_memdup2(mem,size) g_memdup((mem), (size)) -#endif - typedef void (* GtkPrintCupsResponseCallbackFunc) (GtkPrintBackend *print_backend, GtkCupsResult *result, gpointer user_data); diff --git a/testsuite/gtk/calendar.c b/testsuite/gtk/calendar.c index c513f56c41..4e76c71b5c 100644 --- a/testsuite/gtk/calendar.c +++ b/testsuite/gtk/calendar.c @@ -10,11 +10,7 @@ test_calendar_set_day (void) cal = gtk_calendar_new (); -#if GLIB_CHECK_VERSION(2,68,0) tz = g_time_zone_new_identifier ("MET"); -#else - tz = g_time_zone_new ("MET"); -#endif g_assert_nonnull (tz); dt = g_date_time_new (tz, 1970, 3, 1, 0, 0, 0); g_assert_nonnull (dt); diff --git a/testsuite/gtk/flattenlistmodel.c b/testsuite/gtk/flattenlistmodel.c index 4a310956fd..ac9d7891b5 100644 --- a/testsuite/gtk/flattenlistmodel.c +++ b/testsuite/gtk/flattenlistmodel.c @@ -415,12 +415,10 @@ main (int argc, char *argv[]) g_test_add_func ("/flattenlistmodel/create_empty", test_create_empty); g_test_add_func ("/flattenlistmodel/create", test_create); g_test_add_func ("/flattenlistmodel/model/add", test_model_add); -#if GLIB_CHECK_VERSION (2, 58, 0) /* g_list_store_splice() is broken before 2.58 */ g_test_add_func ("/flattenlistmodel/submodel/add", test_submodel_add); g_test_add_func ("/flattenlistmodel/submodel/add2", test_submodel_add2); g_test_add_func ("/flattenlistmodel/model/remove", test_model_remove); g_test_add_func ("/flattenlistmodel/submodel/remove", test_submodel_remove); -#endif return g_test_run (); } diff --git a/testsuite/gtk/multiselection.c b/testsuite/gtk/multiselection.c index 5825ede9ac..270cddd63e 100644 --- a/testsuite/gtk/multiselection.c +++ b/testsuite/gtk/multiselection.c @@ -745,9 +745,7 @@ main (int argc, char *argv[]) g_test_add_func ("/multiselection/create", test_create); g_test_add_func ("/multiselection/create-empty", test_create_empty); -#if GLIB_CHECK_VERSION (2, 58, 0) /* g_list_store_splice() is broken before 2.58 */ g_test_add_func ("/multiselection/changes", test_changes); -#endif g_test_add_func ("/multiselection/selection", test_selection); g_test_add_func ("/multiselection/select-range", test_select_range); g_test_add_func ("/multiselection/readd", test_readd); diff --git a/testsuite/gtk/slicelistmodel.c b/testsuite/gtk/slicelistmodel.c index 84a4ac72ba..0c4cd7e78d 100644 --- a/testsuite/gtk/slicelistmodel.c +++ b/testsuite/gtk/slicelistmodel.c @@ -389,9 +389,7 @@ main (int argc, char *argv[]) g_test_add_func ("/slicelistmodel/create", test_create); g_test_add_func ("/slicelistmodel/set-model", test_set_model); g_test_add_func ("/slicelistmodel/set-slice", test_set_slice); -#if GLIB_CHECK_VERSION (2, 58, 0) /* g_list_store_splice() is broken before 2.58 */ g_test_add_func ("/slicelistmodel/changes", test_changes); -#endif g_test_add_func ("/slicelistmodel/bug/added_equals_removed", test_bug_added_equals_removed); g_test_add_func ("/slicelistmodel/bug/skip_amount", test_bug_skip_amount); diff --git a/testsuite/gtk/sortlistmodel.c b/testsuite/gtk/sortlistmodel.c index 11da526f5a..6a1753373c 100644 --- a/testsuite/gtk/sortlistmodel.c +++ b/testsuite/gtk/sortlistmodel.c @@ -583,10 +583,8 @@ main (int argc, char *argv[]) g_test_add_func ("/sortlistmodel/create", test_create); g_test_add_func ("/sortlistmodel/set-model", test_set_model); g_test_add_func ("/sortlistmodel/set-sorter", test_set_sorter); -#if GLIB_CHECK_VERSION (2, 58, 0) /* g_list_store_splice() is broken before 2.58 */ g_test_add_func ("/sortlistmodel/add_items", test_add_items); g_test_add_func ("/sortlistmodel/remove_items", test_remove_items); -#endif g_test_add_func ("/sortlistmodel/stability", test_stability); g_test_add_func ("/sortlistmodel/incremental/remove", test_incremental_remove); g_test_add_func ("/sortlistmodel/oob-access", test_out_of_bounds_access); diff --git a/testsuite/gtk/timsort.c b/testsuite/gtk/timsort.c index d8aba88698..6e8444e88e 100644 --- a/testsuite/gtk/timsort.c +++ b/testsuite/gtk/timsort.c @@ -21,10 +21,6 @@ #include "gtk/timsort/gtktimsortprivate.h" -#if !GLIB_CHECK_VERSION (2, 67, 3) -# define g_memdup2(mem,size) g_memdup((mem), (size)) -#endif - #define assert_sort_equal(a, b, size, n) \ g_assert_cmpmem (a, sizeof (size) * n, b, sizeof (size) * n) diff --git a/testsuite/reftests/gtk-reftest.c b/testsuite/reftests/gtk-reftest.c index a057a2e9d0..d61d833dee 100644 --- a/testsuite/reftests/gtk-reftest.c +++ b/testsuite/reftests/gtk-reftest.c @@ -69,13 +69,7 @@ static gboolean would_drop (GLogLevelFlags level, const char *domain) { -#if GLIB_CHECK_VERSION (2, 68, 0) return g_log_writer_default_would_drop (level, domain); -#else - return (level & (G_LOG_LEVEL_ERROR | - G_LOG_LEVEL_CRITICAL | - G_LOG_LEVEL_WARNING)) == 0; -#endif } static gboolean diff --git a/tools/updateiconcache.c b/tools/updateiconcache.c index a23c96ca19..7001325e20 100644 --- a/tools/updateiconcache.c +++ b/tools/updateiconcache.c @@ -1608,11 +1608,7 @@ opentmp: utime_buf.actime = path_stat.st_atime; utime_buf.modtime = cache_stat.st_mtime; -#if GLIB_CHECK_VERSION (2, 17, 1) g_utime (path, &utime_buf); -#else - utime (path, &utime_buf); -#endif if (!quiet) g_printerr (_("Cache file created successfully.\n")); |