[pypy-svn] r15332 - pypy/dist/pypy/translator/goal
arigo at codespeak.net
arigo at codespeak.net
Fri Jul 29 12:59:33 CEST 2005
Author: arigo
Date: Fri Jul 29 12:59:32 2005
New Revision: 15332
Modified:
pypy/dist/pypy/translator/goal/targetpypymain.py
Log:
Cannot pass a list to the entry_point function.
Using a hackish workaround...
Modified: pypy/dist/pypy/translator/goal/targetpypymain.py
==============================================================================
--- pypy/dist/pypy/translator/goal/targetpypymain.py (original)
+++ pypy/dist/pypy/translator/goal/targetpypymain.py Fri Jul 29 12:59:32 2005
@@ -18,7 +18,8 @@
# __________ Entry point __________
-def entry_point(argv):
+def entry_point(argvstring):
+ argv = argvstring.split('\x00')
w_argv = space.newlist([space.wrap(s) for s in argv])
w_exitcode = space.call(w_entry_point, w_argv)
# try to pull it all in
@@ -48,11 +49,10 @@
space.exec_(open(filename).read(), w_dict, w_dict)
w_entry_point = space.getitem(w_dict, space.wrap('entry_point'))
- s_list_of_strings = SomeList(ListDef(None, SomeString()))
- return entry_point, [s_list_of_strings]
+ return entry_point, [SomeString()]
# _____ Run translated _____
def run(c_entry_point):
argv = [os.path.join(this_dir, 'app_example.py')]
- exitcode = c_entry_point(argv)
+ exitcode = c_entry_point('\x00'.join(argv))
assert exitcode == 0
More information about the Pypy-commit
mailing list