summaryrefslogtreecommitdiff
path: root/Python/marshal.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2016-09-13 20:22:02 +0200
committerChristian Heimes <christian@python.org>2016-09-13 20:22:02 +0200
commitf051e43b22af014364e231c36489e6745993ea34 (patch)
tree7a35470d92a6a5146bfa321bda6f9024e90adc7d /Python/marshal.c
parenta4d9b17b1fd0f3432c72d686c7668169e39e7119 (diff)
downloadcpython-git-f051e43b22af014364e231c36489e6745993ea34.tar.gz
Issue #28126: Replace Py_MEMCPY with memcpy(). Visual Studio can properly optimize memcpy().
Diffstat (limited to 'Python/marshal.c')
-rw-r--r--Python/marshal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/marshal.c b/Python/marshal.c
index 627a8428e5..87a4b240a4 100644
--- a/Python/marshal.c
+++ b/Python/marshal.c
@@ -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;
}
}