summaryrefslogtreecommitdiff
path: root/giscanner/sourcescanner.py
diff options
context:
space:
mode:
authorGustavo Noronha Silva <gustavo.noronha@collabora.co.uk>2010-08-17 11:31:17 -0300
committerGustavo Noronha Silva <gns@gnome.org>2010-08-17 11:43:31 -0300
commit5e45b27c31df528672134961e4655d5fca08cbc7 (patch)
tree7cf55185817927d1717d042f4fa3de3a722967aa /giscanner/sourcescanner.py
parent883a5aed32e80eb57c8b3089faa58768be2d7364 (diff)
downloadgobject-introspection-5e45b27c31df528672134961e4655d5fca08cbc7.tar.gz
[scanner] Also parse C++ files
This is to support cases such as WebKitGTK+, that have C API implemented in C++ files. Do note this does not mean we support proper C++ parsing. https://bugzilla.gnome.org/show_bug.cgi?id=627152
Diffstat (limited to 'giscanner/sourcescanner.py')
-rw-r--r--giscanner/sourcescanner.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/giscanner/sourcescanner.py b/giscanner/sourcescanner.py
index ae3d29d2..cd7a4321 100644
--- a/giscanner/sourcescanner.py
+++ b/giscanner/sourcescanner.py
@@ -220,7 +220,8 @@ class SourceScanner(object):
headers = []
for filename in filenames:
- if filename.endswith('.c'):
+ if (filename.endswith('.c') or filename.endswith('.cpp') or
+ filename.endswith('.cc') or filename.endswith('.cxx')):
filename = os.path.abspath(filename)
self._scanner.lex_filename(filename)
else: