summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDieter Verfaillie <dieterv@optionexplicit.be>2013-10-17 16:14:11 +0200
committerColin Walters <walters@verbum.org>2013-10-17 15:03:09 -0400
commitce1e2a2cc609b2e9e36c741e72bcfa5859ed6b62 (patch)
tree7357ea6e00c8a32d395f4e75d595e5e5037ce061
parent298e34c20f0187f4daad87ca952fca6f7af28481 (diff)
downloadgobject-introspection-ce1e2a2cc609b2e9e36c741e72bcfa5859ed6b62.tar.gz
Revert "sourcescanner: Avoid scanning files when doing a macro scan"
This reverts commit 77fcc8fa47d63f58b2c3f6216a0493e42f6d44b3. Will be not needed in about 2 patches... https://bugzilla.gnome.org/show_bug.cgi?id=710320
-rw-r--r--giscanner/sourcescanner.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/giscanner/sourcescanner.c b/giscanner/sourcescanner.c
index 830d21cd..90db2946 100644
--- a/giscanner/sourcescanner.c
+++ b/giscanner/sourcescanner.c
@@ -262,9 +262,11 @@ gi_source_scanner_set_macro_scan (GISourceScanner *scanner,
scanner->macro_scan = macro_scan;
}
-static gboolean
-already_has_current_file (GISourceScanner *scanner)
+void
+gi_source_scanner_add_symbol (GISourceScanner *scanner,
+ GISourceSymbol *symbol)
{
+ gboolean found_filename = FALSE;
GList *l;
GFile *current_file;
@@ -276,24 +278,15 @@ already_has_current_file (GISourceScanner *scanner)
GFile *file = g_file_new_for_path (l->data);
if (g_file_equal (file, current_file))
- {
+ {
+ found_filename = TRUE;
g_object_unref (file);
- return TRUE;
- }
-
+ break;
+ }
g_object_unref (file);
}
- g_object_unref (current_file);
-
- return FALSE;
-}
-
-void
-gi_source_scanner_add_symbol (GISourceScanner *scanner,
- GISourceSymbol *symbol)
-{
- if (scanner->macro_scan || already_has_current_file (scanner))
+ if (found_filename || scanner->macro_scan)
scanner->symbols = g_slist_prepend (scanner->symbols,
gi_source_symbol_ref (symbol));
g_assert (symbol->source_filename != NULL);
@@ -315,6 +308,8 @@ gi_source_scanner_add_symbol (GISourceScanner *scanner,
default:
break;
}
+
+ g_object_unref (current_file);
}
GSList *