Added glib g_hash_table_add for glib < 2.32
This commit is contained in:
@@ -64,7 +64,6 @@ p_utf8_substring(const gchar *str, glong start_pos, glong end_pos)
|
||||
return out;
|
||||
}
|
||||
|
||||
// backwards compatibility for GLib version < 2.28
|
||||
void
|
||||
p_slist_free_full(GSList *items, GDestroyNotify free_func)
|
||||
{
|
||||
@@ -79,6 +78,12 @@ p_list_free_full(GList *items, GDestroyNotify free_func)
|
||||
g_list_free (items);
|
||||
}
|
||||
|
||||
gboolean
|
||||
p_hash_table_add(GHashTable *hash_table, gpointer key)
|
||||
{
|
||||
return g_hash_table_replace(hash_table, key, key);
|
||||
}
|
||||
|
||||
gboolean
|
||||
create_dir(char *name)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user