diff options
author | Johan Dahlin <johan@gnome.org> | 2012-04-05 14:12:11 -0300 |
---|---|---|
committer | Johan Dahlin <jdahlin@litl.com> | 2012-04-05 14:12:11 -0300 |
commit | 1c8927d147090fdc2c2f1f91d60a36cb69a19fe9 (patch) | |
tree | 7fe1788247911c445b36a84a83456d05b3c83846 /giscanner/sourcescanner.py | |
parent | e18dc76c6a0e9d30f1b45fd26fdb22e954d319df (diff) | |
download | gobject-introspection-1c8927d147090fdc2c2f1f91d60a36cb69a19fe9.tar.gz |
Do the filename filtering in scannerlexer
This avoids a bit of python work and reduces the
amount of allocations.
Diffstat (limited to 'giscanner/sourcescanner.py')
-rw-r--r-- | giscanner/sourcescanner.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/giscanner/sourcescanner.py b/giscanner/sourcescanner.py index b0d682fc..db282f84 100644 --- a/giscanner/sourcescanner.py +++ b/giscanner/sourcescanner.py @@ -259,10 +259,7 @@ class SourceScanner(object): yield SourceSymbol(self._scanner, symbol) def get_comments(self): - for comment in self._scanner.get_comments(): - filename = comment[-2] - if filename in self._filenames: - yield comment + return self._scanner.get_comments() def dump(self): print '-'*30 |