summaryrefslogtreecommitdiffstats
path: root/Objects/bytesobject.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-09-29 02:02:13 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2011-09-29 02:02:13 (GMT)
commit6430fd56b4da63339c7238a75e5e014b95b39983 (patch)
treeee3332cd34e4004758bf60cf8a31c47a07953580 /Objects/bytesobject.c
parentd9c563e84d358346fb2abf09addfdc6e8b7c0c99 (diff)
downloadcpython-6430fd56b4da63339c7238a75e5e014b95b39983.zip
cpython-6430fd56b4da63339c7238a75e5e014b95b39983.tar.gz
cpython-6430fd56b4da63339c7238a75e5e014b95b39983.tar.bz2
Fix hex_digit_to_int() prototype: expect Py_UCS4, not Py_UNICODE
Diffstat (limited to 'Objects/bytesobject.c')
-rw-r--r--Objects/bytesobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
index b77d693..fa0e8c2 100644
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -593,7 +593,7 @@ PyBytes_Repr(PyObject *obj, int smartquotes)
quote = '"';
if (squotes && quote == '\'')
newsize += squotes;
-
+
if (newsize > (PY_SSIZE_T_MAX - sizeof(PyUnicodeObject) - 1)) {
PyErr_SetString(PyExc_OverflowError,
"bytes object is too large to make repr");
@@ -2330,7 +2330,7 @@ Spaces between two numbers are accepted.\n\
Example: bytes.fromhex('B9 01EF') -> b'\\xb9\\x01\\xef'.");
static int
-hex_digit_to_int(Py_UNICODE c)
+hex_digit_to_int(Py_UCS4 c)
{
if (c >= 128)
return -1;