mirror of
https://github.com/irssi/irssi.git
synced 2024-09-01 04:14:16 -04:00
GLib < 2.56 compat code for g_date_time_new_from_iso8601
This commit is contained in:
parent
395453aa23
commit
33d8cc3254
@ -16,6 +16,21 @@
|
||||
TEXT_BUFFER_REC *color_buf;
|
||||
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)
|
||||
{
|
||||
while (*collector) {
|
||||
|
Loading…
Reference in New Issue
Block a user