mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
merge for issue #18556
This commit is contained in:
commit
5d7c1b1a2b
2 changed files with 8 additions and 1 deletions
|
@ -166,6 +166,9 @@ Core and Builtins
|
|||
Library
|
||||
-------
|
||||
|
||||
- Issue #18556: Check the return type of PyUnicode_AsWideChar() in ctype's
|
||||
U_set().
|
||||
|
||||
- Issue #17818: aifc.getparams now returns a namedtuple.
|
||||
|
||||
- Issue #18549: Eliminate dead code in socket_ntohl()
|
||||
|
|
|
@ -1260,7 +1260,11 @@ U_set(void *ptr, PyObject *value, Py_ssize_t length)
|
|||
} else if (size < length-1)
|
||||
/* copy terminating NUL character if there is space */
|
||||
size += 1;
|
||||
PyUnicode_AsWideChar(value, (wchar_t *)ptr, size);
|
||||
|
||||
if (PyUnicode_AsWideChar(value, (wchar_t *)ptr, size) == -1) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue