[pypy-commit] pypy default: ups
fijal
noreply at buildbot.pypy.org
Wed May 14 22:50:17 CEST 2014
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch:
Changeset: r71522:55d012c01e88
Date: 2014-05-14 22:49 +0200
http://bitbucket.org/pypy/pypy/changeset/55d012c01e88/
Log: ups
diff --git a/rpython/rtyper/rstr.py b/rpython/rtyper/rstr.py
--- a/rpython/rtyper/rstr.py
+++ b/rpython/rtyper/rstr.py
@@ -9,6 +9,7 @@
from rpython.tool.pairtype import pairtype, pair
from rpython.tool.sourcetools import func_with_new_name
from rpython.tool.staticmethods import StaticMethods
+from rpython.rlib.rstring import UnicodeBuilder
class AbstractStringRepr(Repr):
@@ -27,11 +28,12 @@
from rpython.rtyper.annlowlevel import hlstr
value = hlstr(llvalue)
assert value is not None
- univalue, _ = self.rstr_decode_utf_8(
+ result = UnicodeBuilder(len(value))
+ self.rstr_decode_utf_8(
value, len(value), 'strict', final=False,
errorhandler=self.ll_raise_unicode_exception_decode,
- allow_surrogates=False)
- return self.ll.llunicode(univalue)
+ allow_surrogates=False, result=result)
+ return self.ll.llunicode(result.build())
def ll_raise_unicode_exception_decode(self, errors, encoding, msg, s,
startingpos, endingpos):
More information about the pypy-commit
mailing list