[Python-checkins] cpython (merge default -> default): merge heads
senthil.kumaran
python-checkins at python.org
Mon Apr 23 17:57:10 CEST 2012
http://hg.python.org/cpython/rev/55c951167cd9
changeset: 76496:55c951167cd9
parent: 76495:246abd64e830
parent: 76489:e3ea9e975689
user: Senthil Kumaran <senthil at uthcode.com>
date: Mon Apr 23 23:56:36 2012 +0800
summary:
merge heads
files:
Objects/dictobject.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Objects/dictobject.c b/Objects/dictobject.c
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -3686,7 +3686,7 @@
res = PyDict_SetItem(dict, key, value);
if (cached != ((PyDictObject *)dict)->ma_keys) {
/* Either update tp->ht_cached_keys or delete it */
- if (cached->dk_refcnt == 1) {
+ if (cached->dk_refcnt == 1 && PyDict_CheckExact(dict)) {
CACHED_KEYS(tp) = make_keys_shared(dict);
if (CACHED_KEYS(tp) == NULL)
return -1;
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list