[pypy-svn] r26264 - pypy/dist/pypy/translator/cl
sanxiyn at codespeak.net
sanxiyn at codespeak.net
Mon Apr 24 16:16:16 CEST 2006
Author: sanxiyn
Date: Mon Apr 24 16:16:13 2006
New Revision: 26264
Modified:
pypy/dist/pypy/translator/cl/gencl.py
Log:
Get rid of the initial newline in generated lisp sources
Modified: pypy/dist/pypy/translator/cl/gencl.py
==============================================================================
--- pypy/dist/pypy/translator/cl/gencl.py (original)
+++ pypy/dist/pypy/translator/cl/gencl.py Mon Apr 24 16:16:13 2006
@@ -134,7 +134,10 @@
lines = list(self.emit())
declarations = "\n".join(self.declarations)
code = "\n".join(lines)
- return declarations + "\n" + code + "\n"
+ if declarations:
+ return declarations + "\n" + code + "\n"
+ else:
+ return code + "\n"
def emit(self):
while self.pendinggraphs:
More information about the Pypy-commit
mailing list