Author: Antonio Cuni <[email protected]>
Branch: fastjson
Changeset: r64842:27044fc0ceb8
Date: 2013-06-07 18:41 +0200
http://bitbucket.org/pypy/pypy/changeset/27044fc0ceb8/
Log: kill yet another more end-of-string check
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
@@ -203,7 +203,7 @@
def decode_object(self, i):
start = i
w_dict = self.space.newdict()
- while i < self.length:
+ while True:
ch = self.ll_chars[i]
if ch == '}':
self.pos = i+1
@@ -231,10 +231,12 @@
return w_dict
elif ch == ',':
pass
+ elif ch == '\0':
+ self._raise("Unterminated object starting at char %d", start)
else:
self._raise("Unexpected '%s' when decoding object (char %d)",
ch, self.pos)
- self._raise("Unterminated object starting at char %d", start)
+
def decode_string(self, i):
start = i
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit