Author: Antonio Cuni <[email protected]>
Branch: rpython-unicode-formatting
Changeset: r56136:de4658c12f2b
Date: 2012-07-18 14:10 +0200
http://bitbucket.org/pypy/pypy/changeset/de4658c12f2b/
Log: use the official way to convert string to unicode
diff --git a/pypy/rpython/lltypesystem/rstr.py
b/pypy/rpython/lltypesystem/rstr.py
--- a/pypy/rpython/lltypesystem/rstr.py
+++ b/pypy/rpython/lltypesystem/rstr.py
@@ -1028,7 +1028,7 @@
# if we are here, one of the ll_str.* functions returned some
# STR, so we convert it to unicode. It's a bit suboptimal
# because we do one extra copy.
- vchunk = hop.gendirectcall(string_repr.ll_decode_latin1,
vchunk)
+ vchunk = hop.gendirectcall(cls.ll_str2unicode, vchunk)
hop.genop('setarrayitem', [vtemp, i, vchunk])
hop.exception_cannot_occur() # to ignore the ZeroDivisionError of '%'
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit