Author: Christian Hudon <[email protected]>
Branch: stdlib-2.7.5
Changeset: r67171:1307a5424887
Date: 2013-10-06 17:31 -0400
http://bitbucket.org/pypy/pypy/changeset/1307a5424887/
Log: Remove redundant test for NULL; emulate behavior of CPython 2.7 by
only raising an error for control characters < 0x20.
diff --git a/pypy/module/_pypyjson/interp_decoder.py
b/pypy/module/_pypyjson/interp_decoder.py
--- a/pypy/module/_pypyjson/interp_decoder.py
+++ b/pypy/module/_pypyjson/interp_decoder.py
@@ -315,9 +315,7 @@
content_so_far = self.getslice(start, i-1)
self.pos = i-1
return self.decode_string_escaped(start, content_so_far)
- elif ch == '\0':
- self._raise("Unterminated string starting at char %d", start)
- elif ch < '\x20' or ch == '\x7f':
+ elif ch < '\x20':
self._raise("Invalid control character at char %d", self.pos-1)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit