[pypy-svn] pypy default: Translation fixes

amauryfa commits-noreply at bitbucket.org
Tue Feb 8 18:33:03 CET 2011


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: 
Changeset: r41707:6c63e187e82c
Date: 2011-02-08 18:26 +0100
http://bitbucket.org/pypy/pypy/changeset/6c63e187e82c/

Log:	Translation fixes

diff --git a/pypy/rlib/runicode.py b/pypy/rlib/runicode.py
--- a/pypy/rlib/runicode.py
+++ b/pypy/rlib/runicode.py
@@ -763,10 +763,9 @@
                     # preserved
                     pass
                 else:
-                    result.append(ch)
+                    result.append(unichr(ord(ch)))
 
         elif ch == '+':
-            startinpos = pos
             pos += 1 # consume '+'
             if pos < size and s[pos] == '-': # '+-' encodes '+'
                 pos += 1
@@ -794,7 +793,7 @@
             (base64bits > 0 and base64buffer != 0)):
             endinpos = size
             msg = "unterminated shift sequence"
-            res, pos = errorhandler(errors, 'utf-7', msg, s, startinpos, pos)
+            res, pos = errorhandler(errors, 'utf-7', msg, s, shiftOutStartPos, pos)
             result.append(res)
     elif inShift:
         pos = shiftOutStartPos # back off output
@@ -1249,7 +1248,6 @@
             pos += 1
             continue
 
-        startinpos = pos
         # \u-escapes are only interpreted iff the number of leading
         # backslashes is odd
         bs = pos


More information about the Pypy-commit mailing list