1. Preston Timmons
  2. pypy

Commits

Alex Gaynor  committed cf93e89

2 more fixes

  • Participants
  • Parent commits 194eeca
  • Branches dynamic-specialized-tuple

Comments (0)

Files changed (1)

File pypy/module/cpyext/sequence.py

View file
  • Ignore whitespace
         w_res = w_obj.getitem(index)
     else:
         assert isinstance(w_obj, tupleobject.W_TupleObject)
-        w_res = w_obj.wrappeditems[index]
+        w_res = w_obj.getitem(index)
     return borrow_from(w_obj, w_res)
 
 @cpython_api([PyObject], Py_ssize_t, error=CANNOT_FAIL)
     if isinstance(w_obj, listobject.W_ListObject):
         return w_obj.length()
     assert isinstance(w_obj, tupleobject.W_TupleObject)
-    return len(w_obj.wrappeditems)
+    return w_obj.length()
 
 @cpython_api([PyObject, Py_ssize_t, Py_ssize_t], PyObject)
 def PySequence_GetSlice(space, w_obj, start, end):