[pypy-svn] rev 1736 - pypy/trunk/src/pypy/translator/test
sanxiyn at codespeak.net
sanxiyn at codespeak.net
Sat Oct 11 21:07:58 CEST 2003
Author: sanxiyn
Date: Sat Oct 11 21:07:58 2003
New Revision: 1736
Modified:
pypy/trunk/src/pypy/translator/test/buildcl.py
Log:
Fixed problem that buildcl-ed function couldn't
be called multiple times.
Modified: pypy/trunk/src/pypy/translator/test/buildcl.py
==============================================================================
--- pypy/trunk/src/pypy/translator/test/buildcl.py (original)
+++ pypy/trunk/src/pypy/translator/test/buildcl.py Sat Oct 11 21:07:58 2003
@@ -14,20 +14,17 @@
fun = FlowObjSpace().build_flow(func)
gen = GenCL(fun)
out = gen.emitcode()
- fp = path.join("test.lisp")
- i = 0
+ i = 1
+ fp = path.join("test%d.lisp" % i)
while fp.exists():
fp = path.join("test%d.lisp" % i)
i += 1
- fp.write(out)
- fname = fp.path
def _(*args):
- fp = file(fname, "a")
+ fp.write(out)
print >>fp, "(write (", fun.functionname,
for arg in args:
- print >>fp, str(arg),
+ print >>fp, gen.conv(arg),
print >>fp, "))"
- fp.close()
output = exec_cmd("%s %s" % (cl, fname))
return readlisp(output)
return _
More information about the Pypy-commit
mailing list