]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
remove INT_MAX assertions; they can fail with large Py_ssize_t #9058
authorBenjamin Peterson <benjamin@python.org>
Tue, 22 Jun 2010 19:16:37 +0000 (19:16 +0000)
committerBenjamin Peterson <benjamin@python.org>
Tue, 22 Jun 2010 19:16:37 +0000 (19:16 +0000)
Misc/NEWS
Objects/exceptions.c

index feab9c55e4a2586ba74a7658c01383b57b4e0f7d..cb602391382a84b5445b2b6571a3d26e04609752 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -24,6 +24,8 @@ What's New in Python 2.7 release candidate 2?
 Core and Builtins
 -----------------
 
+- Issue #9058: Remove assertions about INT_MAX in UnicodeDecodeError.
+
 - Issue #8202: Previous change to ``sys.argv[0]`` handling for -m command line
   option reverted due to unintended side effects on handling of ``sys.path``.
   See tracker issue for details.
index 2e98283f858bc7d369ffa5618d2435c810a4eed6..711c87dea9ad4597f223894950431e040a34de40 100644 (file)
@@ -1784,9 +1784,6 @@ PyUnicodeDecodeError_Create(
     const char *encoding, const char *object, Py_ssize_t length,
     Py_ssize_t start, Py_ssize_t end, const char *reason)
 {
-    assert(length < INT_MAX);
-    assert(start < INT_MAX);
-    assert(end < INT_MAX);
     return PyObject_CallFunction(PyExc_UnicodeDecodeError, "ss#nns",
                                  encoding, object, length, start, end, reason);
 }