summaryrefslogtreecommitdiffstats
path: root/Modules/hashtable.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2016-09-13 18:22:02 (GMT)
committerChristian Heimes <christian@python.org>2016-09-13 18:22:02 (GMT)
commitf051e43b22af014364e231c36489e6745993ea34 (patch)
tree7a35470d92a6a5146bfa321bda6f9024e90adc7d /Modules/hashtable.c
parenta4d9b17b1fd0f3432c72d686c7668169e39e7119 (diff)
downloadcpython-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/hashtable.c')
-rw-r--r--Modules/hashtable.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/hashtable.c b/Modules/hashtable.c
index 3462fef..0547a6d 100644
--- a/Modules/hashtable.c
+++ b/Modules/hashtable.c
@@ -64,14 +64,14 @@
#define ENTRY_READ_PDATA(TABLE, ENTRY, DATA_SIZE, PDATA) \
do { \
assert((DATA_SIZE) == (TABLE)->data_size); \
- Py_MEMCPY((PDATA), _Py_HASHTABLE_ENTRY_PDATA(TABLE, (ENTRY)), \
+ memcpy((PDATA), _Py_HASHTABLE_ENTRY_PDATA(TABLE, (ENTRY)), \
(DATA_SIZE)); \
} while (0)
#define ENTRY_WRITE_PDATA(TABLE, ENTRY, DATA_SIZE, PDATA) \
do { \
assert((DATA_SIZE) == (TABLE)->data_size); \
- Py_MEMCPY((void *)_Py_HASHTABLE_ENTRY_PDATA((TABLE), (ENTRY)), \
+ memcpy((void *)_Py_HASHTABLE_ENTRY_PDATA((TABLE), (ENTRY)), \
(PDATA), (DATA_SIZE)); \
} while (0)
@@ -337,7 +337,7 @@ _Py_hashtable_set(_Py_hashtable_t *ht, size_t key_size, const void *pkey,
}
entry->key_hash = key_hash;
- Py_MEMCPY((void *)_Py_HASHTABLE_ENTRY_PKEY(entry), pkey, ht->key_size);
+ memcpy((void *)_Py_HASHTABLE_ENTRY_PKEY(entry), pkey, ht->key_size);
if (data)
ENTRY_WRITE_PDATA(ht, entry, data_size, data);