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/zlibmodule.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/zlibmodule.c')
-rw-r--r-- | Modules/zlibmodule.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/zlibmodule.c b/Modules/zlibmodule.c index 4cded31..cfe7f88 100644 --- a/Modules/zlibmodule.c +++ b/Modules/zlibmodule.c @@ -721,9 +721,9 @@ save_unconsumed_input(compobject *self, Py_buffer *data, int err) new_data = PyBytes_FromStringAndSize(NULL, new_size); if (new_data == NULL) return -1; - Py_MEMCPY(PyBytes_AS_STRING(new_data), + memcpy(PyBytes_AS_STRING(new_data), PyBytes_AS_STRING(self->unused_data), old_size); - Py_MEMCPY(PyBytes_AS_STRING(new_data) + old_size, + memcpy(PyBytes_AS_STRING(new_data) + old_size, self->zst.next_in, left_size); Py_SETREF(self->unused_data, new_data); self->zst.avail_in = 0; |