Commit 9d55ac9e authored by Dong-hee,Na's avatar Dong-hee,Na

set is alsho unhashable data structure

parent ce4c60a7
...@@ -557,6 +557,7 @@ void setupSet() { ...@@ -557,6 +557,7 @@ void setupSet() {
frozenset_cls->giveAttr("__nonzero__", set_cls->getattr(internStringMortal("__nonzero__"))); frozenset_cls->giveAttr("__nonzero__", set_cls->getattr(internStringMortal("__nonzero__")));
frozenset_cls->giveAttr("__hash__", new BoxedFunction(boxRTFunction((void*)setHash, BOXED_INT, 1))); frozenset_cls->giveAttr("__hash__", new BoxedFunction(boxRTFunction((void*)setHash, BOXED_INT, 1)));
set_cls->giveAttr("__hash__", None);
set_cls->giveAttr("add", new BoxedFunction(boxRTFunction((void*)setAdd, NONE, 2))); set_cls->giveAttr("add", new BoxedFunction(boxRTFunction((void*)setAdd, NONE, 2)));
set_cls->giveAttr("remove", new BoxedFunction(boxRTFunction((void*)setRemove, NONE, 2))); set_cls->giveAttr("remove", new BoxedFunction(boxRTFunction((void*)setRemove, NONE, 2)));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment