[pypy-commit] pypy virtual-arguments: few more hits
fijal
noreply at buildbot.pypy.org
Wed Jul 18 14:53:11 CEST 2012
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: virtual-arguments
Changeset: r56142:5f1c0d3ad87f
Date: 2012-07-18 14:52 +0200
http://bitbucket.org/pypy/pypy/changeset/5f1c0d3ad87f/
Log: few more hits
diff --git a/pypy/objspace/std/specialisedtupleobject.py b/pypy/objspace/std/specialisedtupleobject.py
--- a/pypy/objspace/std/specialisedtupleobject.py
+++ b/pypy/objspace/std/specialisedtupleobject.py
@@ -270,6 +270,8 @@
if times == 1 and space.type(w_tuple) == space.w_tuple:
return w_tuple
items = w_tuple.tolist()
+ if times < 0:
+ times = 0
return space.newtuple(items * times)
def mul__SpecialisedTuple_ANY(space, w_tuple, w_times):
diff --git a/pypy/objspace/std/tupleobject.py b/pypy/objspace/std/tupleobject.py
--- a/pypy/objspace/std/tupleobject.py
+++ b/pypy/objspace/std/tupleobject.py
@@ -110,6 +110,8 @@
if times == 1 and space.type(w_tuple) == space.w_tuple:
return w_tuple
items = w_tuple.wrappeditems
+ if times < 0:
+ times = 0
return space.newtuple(items * times)
def mul__Tuple_ANY(space, w_tuple, w_times):
More information about the pypy-commit
mailing list