Commit ca306a4c authored by asaka's avatar asaka

make format

parent 19881eb0
...@@ -517,16 +517,16 @@ void setupDict() { ...@@ -517,16 +517,16 @@ void setupDict() {
dict_iterator_cls->freeze(); dict_iterator_cls->freeze();
dict_keys_cls->giveAttr("__name__", boxStrConstant("dictkeys")); dict_keys_cls->giveAttr("__name__", boxStrConstant("dictkeys"));
dict_keys_cls->giveAttr("__iter__", dict_keys_cls->giveAttr(
new BoxedFunction(boxRTFunction((void*)dictViewKeysIter, typeFromClass(dict_iterator_cls), 1))); "__iter__", new BoxedFunction(boxRTFunction((void*)dictViewKeysIter, typeFromClass(dict_iterator_cls), 1)));
dict_keys_cls->freeze(); dict_keys_cls->freeze();
dict_values_cls->giveAttr("__name__", boxStrConstant("dictvalues")); dict_values_cls->giveAttr("__name__", boxStrConstant("dictvalues"));
dict_values_cls->giveAttr("__iter__", dict_values_cls->giveAttr(
new BoxedFunction(boxRTFunction((void*)dictViewValuesIter, typeFromClass(dict_iterator_cls), 1))); "__iter__", new BoxedFunction(boxRTFunction((void*)dictViewValuesIter, typeFromClass(dict_iterator_cls), 1)));
dict_values_cls->freeze(); dict_values_cls->freeze();
dict_items_cls->giveAttr("__name__", boxStrConstant("dictitems")); dict_items_cls->giveAttr("__name__", boxStrConstant("dictitems"));
dict_items_cls->giveAttr("__iter__", dict_items_cls->giveAttr(
new BoxedFunction(boxRTFunction((void*)dictViewItemsIter, typeFromClass(dict_iterator_cls), 1))); "__iter__", new BoxedFunction(boxRTFunction((void*)dictViewItemsIter, typeFromClass(dict_iterator_cls), 1)));
dict_items_cls->freeze(); dict_items_cls->freeze();
} }
......
...@@ -55,7 +55,6 @@ public: ...@@ -55,7 +55,6 @@ public:
Box* dictViewKeysIter(Box* self); Box* dictViewKeysIter(Box* self);
Box* dictViewValuesIter(Box* self); Box* dictViewValuesIter(Box* self);
Box* dictViewItemsIter(Box* self); Box* dictViewItemsIter(Box* self);
} }
#endif #endif
...@@ -72,8 +72,7 @@ Box* dictIterNext(Box* s) { ...@@ -72,8 +72,7 @@ Box* dictIterNext(Box* s) {
return rtn; return rtn;
} }
BoxedDictView::BoxedDictView(BoxedDict* d, BoxedClass* view_cls) BoxedDictView::BoxedDictView(BoxedDict* d, BoxedClass* view_cls) : Box(view_cls), d(d) {
: Box(view_cls), d(d) {
} }
Box* dictViewKeysIter(Box* s) { Box* dictViewKeysIter(Box* s) {
...@@ -93,5 +92,4 @@ Box* dictViewItemsIter(Box* s) { ...@@ -93,5 +92,4 @@ Box* dictViewItemsIter(Box* s) {
BoxedDictView* self = static_cast<BoxedDictView*>(s); BoxedDictView* self = static_cast<BoxedDictView*>(s);
return dictIterItems(self->d); return dictIterItems(self->d);
} }
} }
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