[pypy-svn] r68824 - pypy/branch/logging/pypy/translator/c
arigo at codespeak.net
arigo at codespeak.net
Wed Oct 28 16:42:39 CET 2009
Author: arigo
Date: Wed Oct 28 16:42:39 2009
New Revision: 68824
Modified:
pypy/branch/logging/pypy/translator/c/genc.py
Log:
Rewrite this without using range() and not making a possibly
variable-sized list.
Modified: pypy/branch/logging/pypy/translator/c/genc.py
==============================================================================
--- pypy/branch/logging/pypy/translator/c/genc.py (original)
+++ pypy/branch/logging/pypy/translator/c/genc.py Wed Oct 28 16:42:39 2009
@@ -437,7 +437,11 @@
real_entrypoint = self.entrypoint
#
def _ll_entrypoint(argc, argv):
- list = [rffi.charp2str(argv[i]) for i in range(argc)]
+ list = [''] * argc
+ i = 0
+ while i < argc:
+ list[i] = rffi.charp2str(argv[i])
+ i += 1
return real_entrypoint(list)
#
annhelper = MixLevelHelperAnnotator(db.translator.rtyper)
More information about the Pypy-commit
mailing list