1
0
mirror of https://github.com/irssi/irssi.git synced 2024-10-27 05:20:20 -04:00

GLib < 2.56 compat code for g_date_time_new_from_iso8601

This commit is contained in:
ailin-nemui 2020-04-06 11:55:57 +02:00 committed by Ailin Nemui
parent 395453aa23
commit 33d8cc3254

View File

@ -16,6 +16,21 @@
TEXT_BUFFER_REC *color_buf; TEXT_BUFFER_REC *color_buf;
int scrollback_format; int scrollback_format;
#if GLIB_CHECK_VERSION(2, 56, 0)
/* nothing */
#else
/* compatibility code for old GLib */
static GDateTime *g_date_time_new_from_iso8601(const gchar *iso_date, GTimeZone *default_tz)
{
GTimeVal time;
if (g_time_val_from_iso8601(iso_date, &time)) {
return g_date_time_new_from_timeval_utc(&time);
} else {
return NULL;
}
}
#endif
static void collector_free(GSList **collector) static void collector_free(GSList **collector)
{ {
while (*collector) { while (*collector) {