[pypy-commit] pypy default: Added unwrap method needed for some tests in cpyext

l.diekmann noreply at buildbot.pypy.org
Wed May 25 16:48:01 CEST 2011


Author: Lukas Diekmann <lukas.diekmann at uni-duesseldorf.de>
Branch: 
Changeset: r44444:8cd8afed0062
Date: 2011-04-07 11:49 +0200
http://bitbucket.org/pypy/pypy/changeset/8cd8afed0062/

Log:	Added unwrap method needed for some tests in cpyext

diff --git a/pypy/objspace/std/smalltupleobject.py b/pypy/objspace/std/smalltupleobject.py
--- a/pypy/objspace/std/smalltupleobject.py
+++ b/pypy/objspace/std/smalltupleobject.py
@@ -32,6 +32,10 @@
     def setitem(self, index, w_item):
         raise NotImplementedError
 
+    def unwrap(w_tuple, space):
+        items = [space.unwrap(w_item) for w_item in w_tuple.tolist()] # XXX generic mixed types unwrap
+        return tuple(items)
+
 def make_specialized_class(n):
     iter_n = unrolling_iterable(range(n))
     class cls(W_SmallTupleObject):


More information about the pypy-commit mailing list