]> granicus.if.org Git - python/commitdiff
issue #28144: Decrease empty_keys_struct's dk_refcnt
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 26 Sep 2016 20:01:23 +0000 (23:01 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Mon, 26 Sep 2016 20:01:23 +0000 (23:01 +0300)
since there is no dummy_struct any more.
Patch by Xiang Zhang.

Objects/dictobject.c

index 36ea8f1a5a52c9a37d70b5e49027342de10b2545..fe19445a0296c80a2b2fc66b049667d194459d1d 100644 (file)
@@ -419,7 +419,7 @@ dk_set_index(PyDictKeysObject *keys, Py_ssize_t i, Py_ssize_t ix)
  * (which cannot fail and thus can do no allocation).
  */
 static PyDictKeysObject empty_keys_struct = {
-        2, /* dk_refcnt 1 for this struct, 1 for dummy_struct */
+        1, /* dk_refcnt */
         1, /* dk_size */
         lookdict_split, /* dk_lookup */
         0, /* dk_usable (immutable) */