Author: Antonio Cuni <[email protected]>
Branch: fastjson
Changeset: r64776:08d1da984920
Date: 2013-06-04 17:57 +0200
http://bitbucket.org/pypy/pypy/changeset/08d1da984920/

Log:    rpython fix and typo

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
@@ -28,7 +28,9 @@
         return ch
 
     def unget(self):
-        self.i -= 1
+        i2 = self.i - 1
+        assert i2 > 0 # so that we can use self.i as slice start
+        self.i = i2
 
     def getslice(self, start, end):
         assert end > 0
@@ -43,7 +45,7 @@
                 break
             
     def _raise(self, msg, *args):
-        raise operationerrfmt(self.w_ValueError, msg, *args)
+        raise operationerrfmt(self.space.w_ValueError, msg, *args)
 
     def decode_any(self):
         self.skip_whitespace()
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to