mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Py_BuildValue("C") supports non-BMP characters on narrow build
Py_BuildValue("C") doesn't have to check the code point,
PyUnicode_FromOrdinal() checks its input and now supports non-BMP characters
(range U+10000-U+10FFFF).
This commit is contained in:
@@ -292,11 +292,6 @@ do_mkvalue(const char **p_format, va_list *p_va, int flags)
|
||||
case 'C':
|
||||
{
|
||||
int i = va_arg(*p_va, int);
|
||||
if (i < 0 || i > PyUnicode_GetMax()) {
|
||||
PyErr_SetString(PyExc_OverflowError,
|
||||
"%c arg not in range(0x110000)");
|
||||
return NULL;
|
||||
}
|
||||
return PyUnicode_FromOrdinal(i);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user