Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/giscanner/sourcescanner.c
diff options
context:
space:
mode:
Diffstat (limited to 'giscanner/sourcescanner.c')
-rw-r--r--giscanner/sourcescanner.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/giscanner/sourcescanner.c b/giscanner/sourcescanner.c
index 1a2508d..79d89cd 100644
--- a/giscanner/sourcescanner.c
+++ b/giscanner/sourcescanner.c
@@ -60,6 +60,7 @@ gi_source_symbol_unref (GISourceSymbol * symbol)
if (symbol->base_type)
ctype_free (symbol->base_type);
g_free (symbol->const_string);
+ g_free (symbol->source_filename);
g_slice_free (GISourceSymbol, symbol);
}
}
@@ -245,6 +246,11 @@ gi_source_scanner_add_symbol (GISourceScanner *scanner,
if (found_filename || scanner->macro_scan)
scanner->symbols = g_slist_prepend (scanner->symbols,
gi_source_symbol_ref (symbol));
+ /* TODO: Refcounted string here or some other optimization */
+ if (found_filename && symbol->source_filename == NULL)
+ {
+ symbol->source_filename = g_strdup (scanner->current_filename);
+ }
switch (symbol->type)
{