summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-09-07 02:04:37 (GMT)
committerBenjamin Peterson <benjamin@python.org>2016-09-07 02:04:37 (GMT)
commit35b40c65f6a4d902d7dbff21a02e4d211b0952b1 (patch)
tree0eca2514a6a457031412d3ca52ffef3484c473b8 /Modules
parentd519e025d86fa74d6e65348dad5837c0761a01bd (diff)
parent4a757609d131a29ef52eddcae108b7052e13d31b (diff)
downloadcpython-35b40c65f6a4d902d7dbff21a02e4d211b0952b1.zip
cpython-35b40c65f6a4d902d7dbff21a02e4d211b0952b1.tar.gz
cpython-35b40c65f6a4d902d7dbff21a02e4d211b0952b1.tar.bz2
merge 3.5
Diffstat (limited to 'Modules')
-rw-r--r--Modules/hashtable.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/hashtable.c b/Modules/hashtable.c
index b53cc24..3462fef 100644
--- a/Modules/hashtable.c
+++ b/Modules/hashtable.c
@@ -338,7 +338,8 @@ _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);
- ENTRY_WRITE_PDATA(ht, entry, data_size, data);
+ if (data)
+ ENTRY_WRITE_PDATA(ht, entry, data_size, data);
_Py_slist_prepend(&ht->buckets[index], (_Py_slist_item_t*)entry);
ht->entries++;