[json-glib] gobject: Reuse the list data
- From: Emmanuele Bassi <ebassi src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [json-glib] gobject: Reuse the list data
- Date: Tue, 27 Oct 2009 18:05:07 +0000 (UTC)
commit 85f7a8e8206168d95b3ef9c02aa584f0fae5b37e
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Tue Oct 27 18:03:11 2009 +0000
gobject: Reuse the list data
Since we ignore all members that don't have a corresponding
GParamSpec for the class we cannot use:
members = g_list_prepend (members, pspec->name);
Because pspec might also be NULL. We can reuse the GList iterator
data field, since that points to data internal to the JsonObject
we are iterating over.
json-glib/json-gobject.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/json-glib/json-gobject.c b/json-glib/json-gobject.c
index 7c9a04d..fcabce1 100644
--- a/json-glib/json-gobject.c
+++ b/json-glib/json-gobject.c
@@ -482,7 +482,7 @@ json_gobject_new (GType gtype,
}
next_member:
- members_left = g_list_prepend (members_left, pspec->name);
+ members_left = g_list_prepend (members_left, l->data);
}
retval = g_object_newv (gtype,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]