diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2012-10-23 00:54:47 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2012-10-23 00:54:47 (GMT) |
commit | c6cf1ba29ea75d924fc4644e4f4383a71e146f22 (patch) | |
tree | 5b9950e53bc8400d12521db534e82b59ef530d7e | |
parent | fe75fb4b3e8687a68ea6bb7c4e894434a177c66a (diff) | |
download | cpython-c6cf1ba29ea75d924fc4644e4f4383a71e146f22.zip cpython-c6cf1ba29ea75d924fc4644e4f4383a71e146f22.tar.gz cpython-c6cf1ba29ea75d924fc4644e4f4383a71e146f22.tar.bz2 |
Replace usage of the deprecated Py_UNICODE_COPY() with Py_MEMCPY() in resize_copy()
-rw-r--r-- | Objects/unicodeobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index a7efb01..0a3712e 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -812,8 +812,8 @@ resize_copy(PyObject *unicode, Py_ssize_t length) return NULL; copy_length = _PyUnicode_WSTR_LENGTH(unicode); copy_length = Py_MIN(copy_length, length); - Py_UNICODE_COPY(_PyUnicode_WSTR(w), _PyUnicode_WSTR(unicode), - copy_length); + Py_MEMCPY(_PyUnicode_WSTR(w), _PyUnicode_WSTR(unicode), + copy_length * sizeof(wchar_t)); return w; } } |