[Python-checkins] cpython: Fix hex_digit_to_int() prototype: expect Py_UCS4, not Py_UNICODE

victor.stinner python-checkins at python.org
Thu Sep 29 04:03:21 CEST 2011


http://hg.python.org/cpython/rev/e6a2b54c1d16
changeset:   72520:e6a2b54c1d16
user:        Victor Stinner <victor.stinner at haypocalc.com>
date:        Thu Sep 29 04:02:13 2011 +0200
summary:
  Fix hex_digit_to_int() prototype: expect Py_UCS4, not Py_UNICODE

files:
  Objects/bytearrayobject.c |  4 ++--
  Objects/bytesobject.c     |  4 ++--
  2 files changed, 4 insertions(+), 4 deletions(-)


diff --git a/Objects/bytearrayobject.c b/Objects/bytearrayobject.c
--- a/Objects/bytearrayobject.c
+++ b/Objects/bytearrayobject.c
@@ -1147,7 +1147,7 @@
 \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 @@
 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;
diff --git a/Objects/bytesobject.c b/Objects/bytesobject.c
--- a/Objects/bytesobject.c
+++ b/Objects/bytesobject.c
@@ -593,7 +593,7 @@
         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 @@
 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;

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list