[pypy-commit] pypy unicode-utf8-py3: fix translation

rlamy pypy.commits at gmail.com
Wed Jan 9 19:22:22 EST 2019


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: unicode-utf8-py3
Changeset: r95597:316992f1c55d
Date: 2019-01-10 00:21 +0000
http://bitbucket.org/pypy/pypy/changeset/316992f1c55d/

Log:	fix translation

diff --git a/pypy/module/_sre/interp_sre.py b/pypy/module/_sre/interp_sre.py
--- a/pypy/module/_sre/interp_sre.py
+++ b/pypy/module/_sre/interp_sre.py
@@ -47,8 +47,6 @@
             s = ctx._utf8[start:end]
             lgt = rutf8.get_utf8_length(s)
             return space.newutf8(s, lgt)
-        elif isinstance(ctx, rsre_core.UnicodeMatchContext):
-            return space.newtext(ctx._unicodestr[start:end])
         else:
             # unreachable
             raise SystemError
@@ -157,7 +155,7 @@
         return space.isinstance_w(self.w_pattern, space.w_unicode)
 
     def make_ctx(self, w_string, pos=0, endpos=sys.maxint):
-        """Make a StrMatchContext, BufMatchContext or a UnicodeMatchContext for
+        """Make a StrMatchContext, BufMatchContext or a Utf8MatchContext for
         searching in the given w_string object."""
         space = self.space
         if pos < 0:
@@ -759,8 +757,6 @@
         elif isinstance(ctx, rsre_utf8.Utf8MatchContext):
             lgt = rutf8.get_utf8_length(ctx._utf8)
             return space.newutf8(ctx._utf8, lgt)
-        elif isinstance(ctx, rsre_core.UnicodeMatchContext):
-            return space.newtext(ctx._unicodestr)
         else:
             raise SystemError
 


More information about the pypy-commit mailing list