summaryrefslogtreecommitdiff
path: root/giscanner/sourcescanner.h
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2018-12-09 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2018-12-09 14:44:16 +0100
commit51f7cb11a4f0a247381be9f69d432cc182d8ffda (patch)
tree5030ee6885c9b47647c795aca1baf0ca32a58dab /giscanner/sourcescanner.h
parentf6f32926106587b7969d53d86cf6412b26a0625e (diff)
downloadgobject-introspection-51f7cb11a4f0a247381be9f69d432cc182d8ffda.tar.gz
Replace linked lists with arrays in source scanner
Reduce total number of memory allocations and increase data locality.
Diffstat (limited to 'giscanner/sourcescanner.h')
-rw-r--r--giscanner/sourcescanner.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/giscanner/sourcescanner.h b/giscanner/sourcescanner.h
index bcf1afc4..a788abe9 100644
--- a/giscanner/sourcescanner.h
+++ b/giscanner/sourcescanner.h
@@ -111,14 +111,14 @@ struct _GISourceScanner
gboolean macro_scan;
gboolean private; /* set by gtk-doc comment <private>/<public> */
gboolean flags; /* set by gtk-doc comment <flags> */
- GSList *symbols;
+ GPtrArray *symbols; /* GISourceSymbol */
GHashTable *files;
- GSList *comments; /* _GIComment */
+ GPtrArray *comments; /* GISourceComment */
GHashTable *typedef_table;
GHashTable *const_table;
gboolean skipping;
GQueue conditionals;
- GSList *errors;
+ GPtrArray *errors;
};
struct _GISourceSymbol
@@ -161,9 +161,9 @@ void gi_source_scanner_parse_macros (GISourceScanner *scanne
GList *filenames);
void gi_source_scanner_set_macro_scan (GISourceScanner *scanner,
gboolean macro_scan);
-GSList * gi_source_scanner_get_symbols (GISourceScanner *scanner);
-GSList * gi_source_scanner_get_comments (GISourceScanner *scanner);
-GSList * gi_source_scanner_get_errors (GISourceScanner *scanner);
+GPtrArray * gi_source_scanner_get_symbols (GISourceScanner *scanner);
+GPtrArray * gi_source_scanner_get_comments (GISourceScanner *scanner);
+GPtrArray * gi_source_scanner_get_errors (GISourceScanner *scanner);
void gi_source_scanner_free (GISourceScanner *scanner);
GISourceSymbol * gi_source_symbol_new (GISourceSymbolType type, GFile *file, int line);