[pypy-svn] r16804 - in pypy/release/0.7.x/pypy/lib: _fakecompiler _stablecompiler

arigo at codespeak.net arigo at codespeak.net
Sat Aug 27 19:17:44 CEST 2005


Author: arigo
Date: Sat Aug 27 19:17:41 2005
New Revision: 16804

Modified:
   pypy/release/0.7.x/pypy/lib/_fakecompiler/fakecompiler.py
   pypy/release/0.7.x/pypy/lib/_stablecompiler/apphook.py
Log:
Send the tuple data to the fakecompiler.py by using repr/eval instead of
marshal (which has a depth limitation).


Modified: pypy/release/0.7.x/pypy/lib/_fakecompiler/fakecompiler.py
==============================================================================
--- pypy/release/0.7.x/pypy/lib/_fakecompiler/fakecompiler.py	(original)
+++ pypy/release/0.7.x/pypy/lib/_fakecompiler/fakecompiler.py	Sat Aug 27 19:17:41 2005
@@ -16,7 +16,8 @@
 
 if __name__ == '__main__':
     s = file(DUMPFILE, "rb").read()
-    tup = marshal.loads(s)
+    #tup = marshal.loads(s)
+    tup = eval(s)
     tuples_or_src, filename, mode, done, flag_names = tup
     try:
         code = reallycompile(tuples_or_src, filename, mode, flag_names)

Modified: pypy/release/0.7.x/pypy/lib/_stablecompiler/apphook.py
==============================================================================
--- pypy/release/0.7.x/pypy/lib/_stablecompiler/apphook.py	(original)
+++ pypy/release/0.7.x/pypy/lib/_stablecompiler/apphook.py	Sat Aug 27 19:17:41 2005
@@ -29,7 +29,8 @@
 def fakeapplevelcompile(tuples_or_src, filename, mode, flag_names):
     import os, marshal
     done = False
-    data = marshal.dumps( (tuples_or_src, filename, mode, done, flag_names))
+    #data = marshal.dumps( (tuples_or_src, filename, mode, done, flag_names))
+    data = repr( (tuples_or_src, filename, mode, done, flag_names))
     f = file(DUMPFILE, "wb")
     f.write(data)
     f.close()



More information about the Pypy-commit mailing list