[pypy-svn] r50716 - pypy/dist/pypy/translator/tool
arigo at codespeak.net
arigo at codespeak.net
Thu Jan 17 17:56:19 CET 2008
Author: arigo
Date: Thu Jan 17 17:56:18 2008
New Revision: 50716
Modified:
pypy/dist/pypy/translator/tool/cbuild.py
Log:
Silence some of the warnings 'no newline at the end of file'.
Modified: pypy/dist/pypy/translator/tool/cbuild.py
==============================================================================
--- pypy/dist/pypy/translator/tool/cbuild.py (original)
+++ pypy/dist/pypy/translator/tool/cbuild.py Thu Jan 17 17:56:18 2008
@@ -131,7 +131,10 @@
if being_main:
f.write("#define PYPY_NOT_MAIN_FILE\n")
self.write_c_header(f)
- f.write(str(source))
+ source = str(source)
+ f.write(source)
+ if not source.endswith('\n'):
+ f.write('\n')
f.close()
files.append(str(filename))
d = self._copy_attributes()
More information about the Pypy-commit
mailing list