Author: fijal
Branch: unicode-utf8
Changeset: r92941:4bd78617a41a
Date: 2017-11-04 20:37 +0100
http://bitbucket.org/pypy/pypy/changeset/4bd78617a41a/

Log:    add assertions for now

diff --git a/pypy/objspace/std/unicodeobject.py 
b/pypy/objspace/std/unicodeobject.py
--- a/pypy/objspace/std/unicodeobject.py
+++ b/pypy/objspace/std/unicodeobject.py
@@ -48,6 +48,9 @@
         else:
             assert flag == rutf8.FLAG_REGULAR
             self._index_storage = rutf8.null_storage()
+        lgt, flag_check = rutf8.check_utf8(utf8str, True)
+        assert lgt == length
+        assert flag == flag_check
         # the storage can be one of:
         # - null, unicode with no surrogates
         # - rutf8.UTF8_HAS_SURROGATES
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to