mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
Replace usage of the deprecated Py_UNICODE_COPY() with Py_MEMCPY() in resize_copy()
This commit is contained in:
parent
fe75fb4b3e
commit
c6cf1ba29e
1 changed files with 2 additions and 2 deletions
|
@ -812,8 +812,8 @@ resize_copy(PyObject *unicode, Py_ssize_t length)
|
||||||
return NULL;
|
return NULL;
|
||||||
copy_length = _PyUnicode_WSTR_LENGTH(unicode);
|
copy_length = _PyUnicode_WSTR_LENGTH(unicode);
|
||||||
copy_length = Py_MIN(copy_length, length);
|
copy_length = Py_MIN(copy_length, length);
|
||||||
Py_UNICODE_COPY(_PyUnicode_WSTR(w), _PyUnicode_WSTR(unicode),
|
Py_MEMCPY(_PyUnicode_WSTR(w), _PyUnicode_WSTR(unicode),
|
||||||
copy_length);
|
copy_length * sizeof(wchar_t));
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue