mirror of
https://github.com/python/cpython.git
synced 2025-08-27 20:25:18 +00:00
Fix Unicode doc and replace use of macro with PyMem_New function (GH-94088)
This commit is contained in:
parent
03da5d0f5b
commit
70068b9336
2 changed files with 2 additions and 2 deletions
|
@ -2843,7 +2843,7 @@ PyUnicode_AsWideCharString(PyObject *unicode,
|
|||
}
|
||||
|
||||
buflen = unicode_get_widechar_size(unicode);
|
||||
buffer = (wchar_t *) PyMem_NEW(wchar_t, (buflen + 1));
|
||||
buffer = (wchar_t *) PyMem_New(wchar_t, (buflen + 1));
|
||||
if (buffer == NULL) {
|
||||
PyErr_NoMemory();
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue