diff options
Diffstat (limited to 'lib/ephy-node-db.c')
-rw-r--r-- | lib/ephy-node-db.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/lib/ephy-node-db.c b/lib/ephy-node-db.c index 8f553491a..c98f7b4f7 100644 --- a/lib/ephy-node-db.c +++ b/lib/ephy-node-db.c @@ -504,24 +504,21 @@ ephy_node_db_write_to_xml_valist (EphyNodeDb *db, while (node != NULL) { GPtrArray *children; - guint n_exceptions, i; - GSList *exceptions = NULL; + EphyNodeFilterFunc filter; + gpointer user_data; + int i; - n_exceptions = va_arg (argptr, guint); - for (i=0; i < n_exceptions; i++) - { - exceptions = g_slist_prepend (exceptions, - va_arg (argptr, EphyNode *)); - } + filter = va_arg (argptr, EphyNodeFilterFunc); + user_data = va_arg (argptr, gpointer); children = ephy_node_get_children (node); - for (i=0; i < children->len; i++) + for (i = 0; i < children->len; i++) { EphyNode *kid; kid = g_ptr_array_index (children, i); - if (g_slist_find (exceptions, kid) == NULL) + if (!filter || filter (kid, user_data)) { ret = ephy_node_write_to_xml (kid, writer); if (ret < 0) break; @@ -529,8 +526,6 @@ ephy_node_db_write_to_xml_valist (EphyNodeDb *db, } if (ret < 0) break; - g_slist_free (exceptions); - node = va_arg (argptr, EphyNode *); } if (ret < 0) goto out; |