Fix Unicode doc and replace use of macro with PyMem_New function (GH-94088)

This commit is contained in:
Pamela Fox 2022-07-28 15:32:16 -07:00 committed by GitHub
parent 03da5d0f5b
commit 70068b9336
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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;