mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +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
|
|
@ -107,7 +107,7 @@ STRINGLIB(bytes_join)(PyObject *sep, PyObject *iterable)
|
|||
for (i = 0; i < nbufs; i++) {
|
||||
Py_ssize_t n = buffers[i].len;
|
||||
char *q = buffers[i].buf;
|
||||
Py_MEMCPY(p, q, n);
|
||||
memcpy(p, q, n);
|
||||
p += n;
|
||||
}
|
||||
goto done;
|
||||
|
|
@ -116,12 +116,12 @@ STRINGLIB(bytes_join)(PyObject *sep, PyObject *iterable)
|
|||
Py_ssize_t n;
|
||||
char *q;
|
||||
if (i) {
|
||||
Py_MEMCPY(p, sepstr, seplen);
|
||||
memcpy(p, sepstr, seplen);
|
||||
p += seplen;
|
||||
}
|
||||
n = buffers[i].len;
|
||||
q = buffers[i].buf;
|
||||
Py_MEMCPY(p, q, n);
|
||||
memcpy(p, q, n);
|
||||
p += n;
|
||||
}
|
||||
goto done;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue