26 #ifndef MPD_GLIB_COMPAT_H
27 #define MPD_GLIB_COMPAT_H
31 #if !GLIB_CHECK_VERSION(2,14,0)
33 #define g_queue_clear(q) do { g_queue_free(q); q = g_queue_new(); } while (0)
38 return g_timeout_add(interval * 1000,
function, data);
43 #if !GLIB_CHECK_VERSION(2,16,0)
47 G_GNUC_UNUSED
const gchar *format, ...)
49 g_propagate_error(dest_r, src);
54 G_GNUC_UNUSED
const char *reserved_chars_allowed,
55 G_GNUC_UNUSED gboolean allow_utf8)
57 return g_strdup(unescaped);
62 #if !GLIB_CHECK_VERSION(2,16,0)
69 const char *end = strstr(uri,
"://");
72 return g_strndup(uri, end - uri);