Author: Matti Picus <matti.pi...@gmail.com>
Branch: unicode-utf8-py3
Changeset: r94802:1a502b1e961b
Date: 2018-07-01 23:11 -0500
http://bitbucket.org/pypy/pypy/changeset/1a502b1e961b/

Log:    fixes from module/_sre/test

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,6 +47,8 @@
             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
@@ -742,6 +744,8 @@
         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
 
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to