Author: Antonio Cuni <[email protected]>
Branch: fastjson
Changeset: r65067:4f40b6591af0
Date: 2013-06-28 15:49 +0200
http://bitbucket.org/pypy/pypy/changeset/4f40b6591af0/

Log:    bah, this line was moved by mistake by 89c55c007418. Also, rename
        the test to have a better name

diff --git a/pypy/module/_fastjson/interp_decoder.py 
b/pypy/module/_fastjson/interp_decoder.py
--- a/pypy/module/_fastjson/interp_decoder.py
+++ b/pypy/module/_fastjson/interp_decoder.py
@@ -316,8 +316,8 @@
             val = int(hexdigits, 16)
             if val & 0xfc00 == 0xd800:
                 # surrogate pair
+                val = self.decode_surrogate_pair(i, val)
                 i += 6
-                val = self.decode_surrogate_pair(i, val)
         except ValueError:
             self._raise("Invalid \uXXXX escape (char %d)", i-1)
             return # help the annotator to know that we'll never go beyond
diff --git a/pypy/module/_fastjson/test/test__fastjson.py 
b/pypy/module/_fastjson/test/test__fastjson.py
--- a/pypy/module/_fastjson/test/test__fastjson.py
+++ b/pypy/module/_fastjson/test/test__fastjson.py
@@ -149,7 +149,7 @@
         raises(ValueError, "_fastjson.loads('[1: 2]')")
         raises(ValueError, "_fastjson.loads('[1, 2')")
 
-    def test_big_unicode_decode(self):
+    def test_unicode_surrogate_pair(self):
         import _fastjson
         expected = u'z\U0001d120x'
         res = _fastjson.loads('"z\\ud834\\udd20x"')
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to