libmm-glib,common-helpers: undeprecate g_date_time_format_iso8601()

Avoid a deprecation warning with too new glib:

  ../libmm-glib/mm-common-helpers.c: In function ‘date_time_format_iso8601’:
  ../libmm-glib/mm-common-helpers.c:1729:5: warning: ‘g_date_time_format_iso8601’ is deprecated: Not available before 2.62 [-Wdeprecated-declarations]
   1729 |     return g_date_time_format_iso8601 (dt);
        |     ^~~~~~

This call site is protected by version guards and provides an alternative
implementation in date_time_format_iso8601().
This commit is contained in:
Lubomir Rintel
2022-12-13 18:20:15 +01:00
committed by Aleksander Morgado
parent 6179667d3d
commit 1af34e1746

View File

@@ -1726,7 +1726,9 @@ static gchar *
date_time_format_iso8601 (GDateTime *dt)
{
#if GLIB_CHECK_VERSION (2, 62, 0)
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
return g_date_time_format_iso8601 (dt);
G_GNUC_END_IGNORE_DEPRECATIONS
#else
GString *outstr = NULL;
g_autofree gchar *main_date = NULL;