summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2012-04-27 19:31:45 (GMT)
committerBrett Cannon <brett@python.org>2012-04-27 19:31:45 (GMT)
commit6d3b3218be62b723d8aaea1676e8eb7d7b937649 (patch)
treef6c6a05ed346c34ce3c0e8854aa9f0f439e5367a /Objects
parentaa93642a35ed570ba91a80c583df2c8a383686d6 (diff)
parent64acccf46d6aea1e7d975dcb23e3567cf0b49d5d (diff)
downloadcpython-6d3b3218be62b723d8aaea1676e8eb7d7b937649.zip
cpython-6d3b3218be62b723d8aaea1676e8eb7d7b937649.tar.gz
cpython-6d3b3218be62b723d8aaea1676e8eb7d7b937649.tar.bz2
merge
Diffstat (limited to 'Objects')
-rw-r--r--Objects/typeobject.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 58f55df..9babd57 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -2593,6 +2593,9 @@ type_setattro(PyTypeObject *type, PyObject *name, PyObject *value)
return update_slot(type, name);
}
+extern void
+_PyDictKeys_DecRef(PyDictKeysObject *keys);
+
static void
type_dealloc(PyTypeObject *type)
{
@@ -2616,6 +2619,8 @@ type_dealloc(PyTypeObject *type)
Py_XDECREF(et->ht_name);
Py_XDECREF(et->ht_qualname);
Py_XDECREF(et->ht_slots);
+ if (et->ht_cached_keys)
+ _PyDictKeys_DecRef(et->ht_cached_keys);
Py_TYPE(type)->tp_free((PyObject *)type);
}
@@ -2791,9 +2796,6 @@ type_traverse(PyTypeObject *type, visitproc visit, void *arg)
return 0;
}
-extern void
-_PyDictKeys_DecRef(PyDictKeysObject *keys);
-
static int
type_clear(PyTypeObject *type)
{