diff options
author | Johan Dahlin <johan@gnome.org> | 2012-04-05 11:23:13 -0300 |
---|---|---|
committer | Johan Dahlin <jdahlin@litl.com> | 2012-04-05 11:23:13 -0300 |
commit | e18dc76c6a0e9d30f1b45fd26fdb22e954d319df (patch) | |
tree | e26d862a4170cecffcc58e557035690132d4b2ce | |
parent | 86227e4d1f432bc880b6af7788b9d2b61acd1f3f (diff) | |
download | gobject-introspection-e18dc76c6a0e9d30f1b45fd26fdb22e954d319df.tar.gz |
Don't parse doc comments in dependencies
Only parse doc comments for the files we pass in
on the command line to g-ir-scanner, not the included dependencies.
-rw-r--r-- | giscanner/annotationparser.py | 3 | ||||
-rw-r--r-- | giscanner/sourcescanner.py | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py index 8d84c6cd..dd0c8fdb 100644 --- a/giscanner/annotationparser.py +++ b/giscanner/annotationparser.py @@ -390,6 +390,9 @@ class DocOptions(object): def __init__(self): self.values = [] + def __repr__(self): + return '<DocOptions %r>' % (self.values, ) + def __getitem__(self, item): for key, value in self.values: if key == item: diff --git a/giscanner/sourcescanner.py b/giscanner/sourcescanner.py index 1e61ecf8..b0d682fc 100644 --- a/giscanner/sourcescanner.py +++ b/giscanner/sourcescanner.py @@ -236,6 +236,7 @@ class SourceScanner(object): for filename in filenames: filename = os.path.abspath(filename) self._scanner.append_filename(filename) + self._filenames.append(filename) headers = [] for filename in filenames: @@ -247,7 +248,6 @@ class SourceScanner(object): headers.append(filename) self._parse(headers) - self._filenames.extend(headers) def parse_macros(self, filenames): self._scanner.set_macro_scan(True) @@ -259,7 +259,10 @@ class SourceScanner(object): yield SourceSymbol(self._scanner, symbol) def get_comments(self): - return self._scanner.get_comments() + for comment in self._scanner.get_comments(): + filename = comment[-2] + if filename in self._filenames: + yield comment def dump(self): print '-'*30 |