aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2016-12-25 21:18:04 +0300
committerZyX <kp-pav@yandex.ru>2017-01-03 06:39:23 +0300
commit38ab553eb25d67567a0e51f75e7a3aeaa631404c (patch)
tree92878f983eb759df6fef7555d63b48f0a745cc81
parent27343bc5b2b56cba76059c117fb97b558bc7bc78 (diff)
downloadrneovim-38ab553eb25d67567a0e51f75e7a3aeaa631404c.tar.gz
rneovim-38ab553eb25d67567a0e51f75e7a3aeaa631404c.tar.bz2
rneovim-38ab553eb25d67567a0e51f75e7a3aeaa631404c.zip
clint: Allow including .c.h files multiple times
Except when they are system just in case. There should be no .c.h system files though, but if there will be it is unlikely that they inherit the same convention.
-rwxr-xr-xsrc/clint.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/clint.py b/src/clint.py
index efc5f18378..07733d211e 100755
--- a/src/clint.py
+++ b/src/clint.py
@@ -3001,9 +3001,10 @@ def CheckIncludeLine(filename, clean_lines, linenum, include_state, error):
include = match.group(2)
is_system = (match.group(1) == '<')
if include in include_state:
- error(filename, linenum, 'build/include', 4,
- '"%s" already included at %s:%s' %
- (include, filename, include_state[include]))
+ if is_system or not include.endswith('.c.h'):
+ error(filename, linenum, 'build/include', 4,
+ '"%s" already included at %s:%s' %
+ (include, filename, include_state[include]))
else:
include_state[include] = linenum