diff options
author | Christian Heimes <christian@python.org> | 2016-09-13 18:22:02 (GMT) |
---|---|---|
committer | Christian Heimes <christian@python.org> | 2016-09-13 18:22:02 (GMT) |
commit | f051e43b22af014364e231c36489e6745993ea34 (patch) | |
tree | 7a35470d92a6a5146bfa321bda6f9024e90adc7d /Modules/arraymodule.c | |
parent | a4d9b17b1fd0f3432c72d686c7668169e39e7119 (diff) | |
download | cpython-f051e43b22af014364e231c36489e6745993ea34.zip cpython-f051e43b22af014364e231c36489e6745993ea34.tar.gz cpython-f051e43b22af014364e231c36489e6745993ea34.tar.bz2 |
Issue #28126: Replace Py_MEMCPY with memcpy(). Visual Studio can properly optimize memcpy().
Diffstat (limited to 'Modules/arraymodule.c')
-rw-r--r-- | Modules/arraymodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index 5868c52..2caa8ee 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -836,10 +836,10 @@ array_repeat(arrayobject *a, Py_ssize_t n) memset(np->ob_item, a->ob_item[0], newbytes); } else { Py_ssize_t done = oldbytes; - Py_MEMCPY(np->ob_item, a->ob_item, oldbytes); + memcpy(np->ob_item, a->ob_item, oldbytes); while (done < newbytes) { Py_ssize_t ncopy = (done <= newbytes-done) ? done : newbytes-done; - Py_MEMCPY(np->ob_item+done, np->ob_item, ncopy); + memcpy(np->ob_item+done, np->ob_item, ncopy); done += ncopy; } } |