"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "SCons/Scanner/C.py" between
SCons-4.3.0.tar.gz and SCons-4.4.0.tar.gz

About: SCons is a software construction tool (a Python script and a set of modules as a superior alternative to the classic "Make" build tool).

C.py  (SCons-4.3.0):C.py  (SCons-4.4.0)
skipping to change at line 63 skipping to change at line 63
return result return result
def read_file(self, file): def read_file(self, file):
try: try:
with open(str(file.rfile())) as fp: with open(str(file.rfile())) as fp:
return fp.read() return fp.read()
except EnvironmentError as e: except EnvironmentError as e:
self.missing.append((file, self.current_file)) self.missing.append((file, self.current_file))
return '' return ''
def dictify_CPPDEFINES(env): def dictify_CPPDEFINES(env) -> dict:
"""Returns CPPDEFINES converted to a dict."""
cppdefines = env.get('CPPDEFINES', {}) cppdefines = env.get('CPPDEFINES', {})
if cppdefines is None: if cppdefines is None:
return {} return {}
if SCons.Util.is_Sequence(cppdefines): if SCons.Util.is_Sequence(cppdefines):
result = {} result = {}
for c in cppdefines: for c in cppdefines:
if SCons.Util.is_Sequence(c): if SCons.Util.is_Sequence(c):
result[c[0]] = c[1] try:
result[c[0]] = c[1]
except IndexError:
# it could be a one-item sequence
result[c[0]] = None
else: else:
result[c] = None result[c] = None
return result return result
if not SCons.Util.is_Dict(cppdefines): if not SCons.Util.is_Dict(cppdefines):
return {cppdefines : None} return {cppdefines : None}
return cppdefines return cppdefines
class SConsCPPScannerWrapper: class SConsCPPScannerWrapper:
"""The SCons wrapper around a cpp.py scanner. """The SCons wrapper around a cpp.py scanner.
 End of changes. 2 change blocks. 
2 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)