mirror of https://github.com/python/cpython
Fix hex_digit_to_int() prototype: expect Py_UCS4, not Py_UNICODE
This commit is contained in:
parent
d9c563e84d
commit
6430fd56b4
|
@ -2629,7 +2629,7 @@ Spaces between two numbers are accepted.\n\
|
||||||
Example: bytearray.fromhex('B9 01EF') -> bytearray(b'\\xb9\\x01\\xef').");
|
Example: bytearray.fromhex('B9 01EF') -> bytearray(b'\\xb9\\x01\\xef').");
|
||||||
|
|
||||||
static int
|
static int
|
||||||
hex_digit_to_int(Py_UNICODE c)
|
hex_digit_to_int(Py_UCS4 c)
|
||||||
{
|
{
|
||||||
if (c >= 128)
|
if (c >= 128)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -2330,7 +2330,7 @@ Spaces between two numbers are accepted.\n\
|
||||||
Example: bytes.fromhex('B9 01EF') -> b'\\xb9\\x01\\xef'.");
|
Example: bytes.fromhex('B9 01EF') -> b'\\xb9\\x01\\xef'.");
|
||||||
|
|
||||||
static int
|
static int
|
||||||
hex_digit_to_int(Py_UNICODE c)
|
hex_digit_to_int(Py_UCS4 c)
|
||||||
{
|
{
|
||||||
if (c >= 128)
|
if (c >= 128)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Reference in New Issue