Issue #28126: Replace Py_MEMCPY with memcpy(). Visual Studio can properly optimize memcpy().

This commit is contained in:
Christian Heimes 2016-09-13 20:22:02 +02:00
parent a4d9b17b1f
commit f051e43b22
14 changed files with 83 additions and 97 deletions

View file

@ -130,7 +130,7 @@ w_string(const char *s, Py_ssize_t n, WFILE *p)
m = p->end - p->ptr;
if (p->fp != NULL) {
if (n <= m) {
Py_MEMCPY(p->ptr, s, n);
memcpy(p->ptr, s, n);
p->ptr += n;
}
else {
@ -140,7 +140,7 @@ w_string(const char *s, Py_ssize_t n, WFILE *p)
}
else {
if (n <= m || w_reserve(p, n - m)) {
Py_MEMCPY(p->ptr, s, n);
memcpy(p->ptr, s, n);
p->ptr += n;
}
}