]> granicus.if.org Git - python/commitdiff
Fix hex_digit_to_int() prototype: expect Py_UCS4, not Py_UNICODE
authorVictor Stinner <victor.stinner@haypocalc.com>
Thu, 29 Sep 2011 02:02:13 +0000 (04:02 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Thu, 29 Sep 2011 02:02:13 +0000 (04:02 +0200)
Objects/bytearrayobject.c
Objects/bytesobject.c

index d294cd67b1d3e016f718bdb489efc16e8699a615..72e581552a5d0156b116c629a93f57633ae6894b 100644 (file)
@@ -1147,7 +1147,7 @@ PyDoc_STRVAR(clear__doc__,
 \n\
 Remove all items from B.");
 
-static PyObject * 
+static PyObject *
 bytearray_clear(PyByteArrayObject *self)
 {
     if (PyByteArray_Resize((PyObject *)self, 0) < 0)
@@ -2629,7 +2629,7 @@ Spaces between two numbers are accepted.\n\
 Example: bytearray.fromhex('B9 01EF') -> bytearray(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;
index b77d693fac8889e090c7b4bbd9ac27ba590e22c1..fa0e8c2c9990b111c1381dd5ecb60c45c9da7c87 100644 (file)
@@ -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;