2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-12-24 02:05:12 +01:00

Save a few function calls in waflib/Tools/c_preproc.py

This commit is contained in:
Thomas Nagy 2016-03-25 12:22:00 +01:00
parent ca01ddb83a
commit 5d8d7bf700
No known key found for this signature in database
GPG Key ID: 67A565EDFDF90E64

View File

@ -156,7 +156,7 @@ def filter_comments(filename):
for (a, b) in trig_def: code = code.split(a).join(b)
code = re_nl.sub('', code)
code = re_cpp.sub(repl, code)
return [(m.group(2), m.group(3)) for m in re.finditer(re_lines, code)]
return [(m.group(2), m.group(3)) for m in re_lines.finditer(code)]
prec = {}
"""
@ -903,7 +903,8 @@ class c_parser(object):
# issue #812
raise PreprocError("recursion limit exceeded")
debug('preproc: reading file %r', node)
if Logs.verbose:
debug('preproc: reading file %r', node)
try:
lines = self.parse_lines(node)
except EnvironmentError: