diff --git a/query.py b/query.py index b157f11..246f588 100755 --- a/query.py +++ b/query.py @@ -65,7 +65,7 @@ def query (cmd, *args): path = args[1] ext = os.path.splitext(path)[1] - if ext == '.c' or ext == '.h': + if ext in ['.c', '.cc', '.cpp', '.h']: tokens = scriptLines ('tokenize-file', version, path) even = True for tok in tokens: diff --git a/update.py b/update.py index f78b997..f2eda9c 100755 --- a/update.py +++ b/update.py @@ -75,7 +75,7 @@ def updateDefinitions (blobs): filename = db.file.get (blob) ext = os.path.splitext(filename)[1] - if not (ext == '.c' or ext == '.h'): continue + if ext not in ['.c', '.cc', '.cpp', '.h']: continue lines = scriptLines ('parse-defs', hash, filename) for l in lines: @@ -98,7 +98,7 @@ def updateReferences (blobs): filename = db.file.get (blob) ext = os.path.splitext(filename)[1] - if not (ext == '.c' or ext == '.h'): continue + if ext not in ['.c', '.cc', '.cpp', '.h']: continue tokens = scriptLines ('tokenize-file', '-b', hash) even = True