Commits

Philip Jenvey  committed e0ba4ac

adapt to the new methods (fix translation)

  • Participants
  • Parent commits 2f71b39

Comments (0)

Files changed (1)

File pypy/module/cpyext/unicodeobject.py

 from pypy.module.cpyext.stringobject import PyString_Check
 from pypy.module.sys.interp_encoding import setdefaultencoding
 from pypy.module._codecs.interp_codecs import CodecState
-from pypy.objspace.std import unicodeobject, unicodetype, stringtype
-from rpython.rlib import runicode
+from pypy.objspace.std import unicodeobject, unicodetype
+from rpython.rlib import rstring, runicode
 from rpython.tool.sourcetools import func_renamer
 import sys
 
     str = space.unicode_w(w_str)
     substr = space.unicode_w(w_substr)
     if rffi.cast(lltype.Signed, direction) <= 0:
-        return stringtype.stringstartswith(str, substr, start, end)
+        return rstring.startswith(str, substr, start, end)
     else:
-        return stringtype.stringendswith(str, substr, start, end)
+        return rstring.endswith(str, substr, start, end)
 
 @cpython_api([PyObject, PyObject, Py_ssize_t, Py_ssize_t], Py_ssize_t, error=-1)
 def PyUnicode_Count(space, w_str, w_substr, start, end):