mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Fix hex_digit_to_int() prototype: expect Py_UCS4, not Py_UNICODE
This commit is contained in:
parent
d9c563e84d
commit
6430fd56b4
2 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue