Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r92714:38ac9e4520a1 Date: 2017-10-11 11:11 +0200 http://bitbucket.org/pypy/pypy/changeset/38ac9e4520a1/
Log: Backed out changeset 382f89d5d1c5 Oops, our fault, but 1b7397a88e79 should be fixed in cpyext/ diff --git a/pypy/objspace/std/setobject.py b/pypy/objspace/std/setobject.py --- a/pypy/objspace/std/setobject.py +++ b/pypy/objspace/std/setobject.py @@ -47,9 +47,9 @@ def delweakref(self): self._lifeline_ = None - def switch_to_object_strategy(self): + def switch_to_object_strategy(self, space): d = self.strategy.getdict_w(self) - self.strategy = strategy = self.space.fromcache(ObjectSetStrategy) + self.strategy = strategy = space.fromcache(ObjectSetStrategy) self.sstorage = strategy.erase(d) def switch_to_empty_strategy(self): @@ -912,14 +912,14 @@ d = self.unerase(w_set.sstorage) d[self.unwrap(w_key)] = None else: - w_set.switch_to_object_strategy() + w_set.switch_to_object_strategy(self.space) w_set.add(w_key) def remove(self, w_set, w_item): d = self.unerase(w_set.sstorage) if not self.is_correct_type(w_item): #XXX check type of w_item and immediately return False in some cases - w_set.switch_to_object_strategy() + w_set.switch_to_object_strategy(self.space) return w_set.remove(w_item) key = self.unwrap(w_item) @@ -949,7 +949,7 @@ def has_key(self, w_set, w_key): if not self.is_correct_type(w_key): #XXX check type of w_item and immediately return False in some cases - w_set.switch_to_object_strategy() + w_set.switch_to_object_strategy(self.space) return w_set.has_key(w_key) d = self.unerase(w_set.sstorage) return self.unwrap(w_key) in d @@ -1205,7 +1205,7 @@ return if w_other.length() == 0: return - w_set.switch_to_object_strategy() + w_set.switch_to_object_strategy(self.space) w_set.update(w_other) def popitem(self, w_set): _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit