]> granicus.if.org Git - python/commitdiff
Fix strict-aliasing rules errors on gcc 4.8.5. (GH-16714)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 14 Oct 2019 02:14:27 +0000 (19:14 -0700)
committerGitHub <noreply@github.com>
Mon, 14 Oct 2019 02:14:27 +0000 (19:14 -0700)
(cherry picked from commit c39d1ddc012987e2159a997e27665d2d579c0ce0)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
Objects/dictobject.c

index 31f962d16b25ed969e5f55ca064b1631cae24649..a6ddf70cd8fa6afd2ec8ac769e989052cc22b38f 100644 (file)
@@ -1129,7 +1129,7 @@ insert_to_emptydict(PyDictObject *mp, PyObject *key, Py_hash_t hash,
     MAINTAIN_TRACKING(mp, key, value);
 
     size_t hashpos = (size_t)hash & (PyDict_MINSIZE-1);
-    PyDictKeyEntry *ep = &DK_ENTRIES(mp->ma_keys)[0];
+    PyDictKeyEntry *ep = DK_ENTRIES(mp->ma_keys);
     dictkeys_set_index(mp->ma_keys, hashpos, 0);
     ep->me_key = key;
     ep->me_hash = hash;