[tracker/wip/miner-fs-refactor: 17/55] libtracker-miner: change arguments in tracker_indexing_tree_get_parent_is_indexable()



commit 64688c3a4655e61d5bc098e10dd44fafbb7ea111
Author: Carlos Garnacho <carlos lanedo com>
Date:   Thu Sep 8 16:16:06 2011 +0200

    libtracker-miner: change arguments in tracker_indexing_tree_get_parent_is_indexable()
    
    Now a GList is passed instead of an array.

 src/libtracker-miner/tracker-indexing-tree.c |   16 +++++++---------
 src/libtracker-miner/tracker-indexing-tree.h |    3 +--
 2 files changed, 8 insertions(+), 11 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-indexing-tree.c b/src/libtracker-miner/tracker-indexing-tree.c
index 630a409..2208eb3 100644
--- a/src/libtracker-miner/tracker-indexing-tree.c
+++ b/src/libtracker-miner/tracker-indexing-tree.c
@@ -572,26 +572,24 @@ tracker_indexing_tree_file_is_indexable (TrackerIndexingTree *tree,
  * Returns: %TRUE if @parent should be indexed.
  **/
 gboolean
-tracker_indexing_tree_parent_is_indexable (TrackerIndexingTree  *tree,
-                                           GFile                *parent,
-                                           GFile               **children,
-                                           gint                  n_children)
+tracker_indexing_tree_parent_is_indexable (TrackerIndexingTree *tree,
+                                           GFile               *parent,
+                                           GList               *children)
 {
-	gint i = 0;
-
 	if (!tracker_indexing_tree_file_is_indexable (tree,
 	                                              parent,
 	                                              G_FILE_TYPE_DIRECTORY)) {
 		return FALSE;
 	}
 
-	while (i < n_children &&
-	       children[i] != NULL) {
+	while (children) {
 		if (tracker_indexing_tree_file_matches_filter (tree,
 		                                               TRACKER_FILTER_PARENT_DIRECTORY,
-		                                               children[i])) {
+		                                               children->data)) {
 			return FALSE;
 		}
+
+		children = children->next;
 	}
 
 	return TRUE;
diff --git a/src/libtracker-miner/tracker-indexing-tree.h b/src/libtracker-miner/tracker-indexing-tree.h
index 0623365..ec4dd96 100644
--- a/src/libtracker-miner/tracker-indexing-tree.h
+++ b/src/libtracker-miner/tracker-indexing-tree.h
@@ -81,8 +81,7 @@ gboolean  tracker_indexing_tree_file_is_indexable    (TrackerIndexingTree  *tree
                                                       GFileType             file_type);
 gboolean  tracker_indexing_tree_parent_is_indexable  (TrackerIndexingTree  *tree,
                                                       GFile                *parent,
-                                                      GFile               **children,
-                                                      gint                  n_children);
+                                                      GList                *children);
 
 GFile *   tracker_indexing_tree_get_effective_parent (TrackerIndexingTree   *tree,
                                                       GFile                 *file,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]