Thu, 14 Nov 2019 23:17:57 -0600
Bump the glib minimum version to 2.48 and remove checks for it
| libpurple/glibcompat.h | file | annotate | diff | comparison | revisions | |
| meson.build | file | annotate | diff | comparison | revisions | |
| pidgin/libpidgin.c | file | annotate | diff | comparison | revisions |
--- a/libpurple/glibcompat.h Fri Nov 15 05:10:23 2019 +0000 +++ b/libpurple/glibcompat.h Thu Nov 14 23:17:57 2019 -0600 @@ -49,20 +49,4 @@ # define g_stat purple_g_stat #endif -/****************************************************************************** - * g_assert_* macros - *****************************************************************************/ -#if !GLIB_CHECK_VERSION(2, 46, 0) -#define g_assert_cmpmem(m1, l1, m2, l2) G_STMT_START {\ - gconstpointer __m1 = m1, __m2 = m2; \ - int __l1 = l1, __l2 = l2; \ - if (__l1 != __l2) \ - g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ - #l1 " (len(" #m1 ")) == " #l2 " (len(" #m2 "))", __l1, "==", __l2, 'i'); \ - else if (memcmp (__m1, __m2, __l1) != 0) \ - g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \ - "assertion failed (" #m1 " == " #m2 ")"); \ - } G_STMT_END -#endif - #endif /* PURPLE_GLIBCOMPAT_H */
--- a/meson.build Fri Nov 15 05:10:23 2019 +0000 +++ b/meson.build Thu Nov 14 23:17:57 2019 -0600 @@ -274,7 +274,7 @@ # ####################################################################### # # Check for GLib 2.44 (required) # ####################################################################### -glib = dependency('glib-2.0', version : '>= 2.44.0') +glib = dependency('glib-2.0', version : '>= 2.48.0') gio = dependency('gio-2.0') gobject = dependency('gobject-2.0') gthread = dependency('gthread-2.0')
--- a/pidgin/libpidgin.c Fri Nov 15 05:10:23 2019 +0000 +++ b/pidgin/libpidgin.c Thu Nov 14 23:17:57 2019 -0600 @@ -340,9 +340,7 @@ pidgin_handle_local_options_cb(GApplication *app, GVariantDict *options, gpointer user_data) { -#if !GLIB_CHECK_VERSION(2, 48, 0) gchar *app_id = NULL; -#endif if (g_variant_dict_contains(options, "version")) { printf("%s %s (libpurple %s)\n", PIDGIN_NAME, DISPLAY_VERSION, @@ -350,14 +348,12 @@ return 0; } -#if !GLIB_CHECK_VERSION(2, 48, 0) if (g_variant_dict_lookup(options, "gapplication-app-id", "s", &app_id)) { g_variant_dict_remove(options, "gapplication-app-id"); g_application_set_application_id(app, app_id); g_free(app_id); } -#endif return -1; } @@ -415,13 +411,11 @@ } static GOptionEntry option_entries[] = { -#if !GLIB_CHECK_VERSION(2, 48, 0) /* Support G_APPLICATION_CAN_OVERRIDE_APP_ID functionality * even though we don't depend on version 2.48 yet */ {"gapplication-app-id", '\0', 0, G_OPTION_ARG_STRING, NULL, N_("Override the application's ID") }, -#endif {"config", 'c', 0, G_OPTION_ARG_FILENAME, &opt_config_dir_arg, N_("use DIR for config files"), N_("DIR")}, @@ -731,9 +725,7 @@ #endif app = G_APPLICATION(gtk_application_new("im.pidgin.Pidgin3", -#if GLIB_CHECK_VERSION(2, 48, 0) G_APPLICATION_CAN_OVERRIDE_APP_ID | -#endif G_APPLICATION_HANDLES_COMMAND_LINE)); g_application_add_main_option_entries(app, option_entries);