diff options
author | Johan Dahlin <johan@gnome.org> | 2010-09-19 11:33:38 -0300 |
---|---|---|
committer | Johan Dahlin <johan@gnome.org> | 2010-09-19 12:04:20 -0300 |
commit | cb61330eb495786bf8232ebcb51b0d6d9a753ce7 (patch) | |
tree | 544f43868003c027ad127e497ba9f959da12da37 /giscanner/sourcescanner.c | |
parent | 9180641a496b26b5d5a720a2f2a61c710f094d2a (diff) | |
download | gobject-introspection-cb61330eb495786bf8232ebcb51b0d6d9a753ce7.tar.gz |
Save the line number of a source comment
Diffstat (limited to 'giscanner/sourcescanner.c')
-rw-r--r-- | giscanner/sourcescanner.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/giscanner/sourcescanner.c b/giscanner/sourcescanner.c index 14e3a3bd..e519a942 100644 --- a/giscanner/sourcescanner.c +++ b/giscanner/sourcescanner.c @@ -194,6 +194,14 @@ gi_source_scanner_new (void) return scanner; } +static void +gi_source_comment_free (GISourceComment *comment) +{ + g_free (comment->comment); + g_free (comment->filename); + g_slice_free (GISourceComment, comment); +} + void gi_source_scanner_free (GISourceScanner *scanner) { @@ -202,7 +210,7 @@ gi_source_scanner_free (GISourceScanner *scanner) g_hash_table_destroy (scanner->typedef_table); g_hash_table_destroy (scanner->struct_or_union_or_enum_table); - g_slist_foreach (scanner->comments, (GFunc)g_free, NULL); + g_slist_foreach (scanner->comments, (GFunc)gi_source_comment_free, NULL); g_slist_free (scanner->comments); g_slist_foreach (scanner->symbols, (GFunc)gi_source_symbol_unref, NULL); g_slist_free (scanner->symbols); |