[gobject-introspection] Don't parse doc comments in dependencies
- From: Johan Dahlin <johan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] Don't parse doc comments in dependencies
- Date: Thu, 5 Apr 2012 14:26:40 +0000 (UTC)
commit e18dc76c6a0e9d30f1b45fd26fdb22e954d319df
Author: Johan Dahlin <johan gnome org>
Date: Thu Apr 5 11:23:13 2012 -0300
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.
giscanner/annotationparser.py | 3 +++
giscanner/sourcescanner.py | 7 +++++--
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/giscanner/annotationparser.py b/giscanner/annotationparser.py
index 8d84c6c..dd0c8fd 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 1e61ecf..b0d682f 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]