mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #28126: Replace Py_MEMCPY with memcpy(). Visual Studio can properly optimize memcpy().
This commit is contained in:
parent
a4d9b17b1f
commit
f051e43b22
14 changed files with 83 additions and 97 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue