2007-10-08 Emmanuele Bassi <ebassi@openedhand.com>

* clutter/clutter-script.c (json_parse_end):
	* clutter/json/json-object.c (json_object_get_members): Replace
	the GLib 2.14 API with the equivalent code for GLib < 2.14.

	* configure.ac: Revert the dependency bump.
This commit is contained in:
Emmanuele Bassi
2007-10-08 15:18:31 +00:00
parent adcfc6d130
commit 9e81870d0b
4 changed files with 46 additions and 10 deletions

View File

@ -158,6 +158,31 @@ json_object_add_member (JsonObject *object,
g_hash_table_replace (object->members, g_strdup (member_name), node);
}
#if GLIB_MAJOR_VERSION >= 2 && GLIB_MAJOR_VERSION < 14
static void
get_keys (gpointer key,
gpointer value,
gpointer data)
{
GList **list = data;
*list = g_list_prepend (*list, key);
}
static GList *
g_hash_table_get_keys (GHashTable *hash_table)
{
GList *retval;
g_return_val_if_fail (hash_table != NULL, NULL);
retval = NULL;
g_hash_table_foreach (hash_table, get_keys, &retval);
return g_list_reverse (retval);
}
#endif
/**
* json_object_get_members:
* @object: a #JsonObject