mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-08 09:40:10 +00:00
Drop redundant glib version checks
We require GLib 2.72 now.
This commit is contained in:
parent
60aaf38f39
commit
ebe6d52252
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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 ();
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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
|
||||
|
@ -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"));
|
||||
|
Loading…
Reference in New Issue
Block a user