[pypy-commit] pypy list-strategies: do not change back to empty strategy anymore; forget to cast list

l.diekmann noreply at buildbot.pypy.org
Fri Sep 23 13:14:59 CEST 2011


Author: Lukas Diekmann <lukas.diekmann at uni-duesseldorf.de>
Branch: list-strategies
Changeset: r47529:0312461f313b
Date: 2011-09-02 11:37 +0200
http://bitbucket.org/pypy/pypy/changeset/0312461f313b/

Log:	do not change back to empty strategy anymore; forget to cast list

diff --git a/pypy/objspace/std/listobject.py b/pypy/objspace/std/listobject.py
--- a/pypy/objspace/std/listobject.py
+++ b/pypy/objspace/std/listobject.py
@@ -403,8 +403,8 @@
     def mul(self, w_list, times):
         #XXX is this faster?
         if times == 0:
-            strategy = self.space.fromcache(EmptyListStrategy)
-            storage = strategy.emptylist
+            strategy = self.space.fromcache(IntegerListStrategy)
+            storage = strategy.cast_to_void_star([])
         else:
             l = self._getitems_range(w_list, False)
             l *= times


More information about the pypy-commit mailing list