Commit 9e8f0868 authored by Chris Toshok's avatar Chris Toshok

root the BoxIterators we create for both zip() and map()

parent a78a72f3
...@@ -477,8 +477,8 @@ Box* map(Box* f, BoxedTuple* args) { ...@@ -477,8 +477,8 @@ Box* map(Box* f, BoxedTuple* args) {
if (num_iterable == 1) if (num_iterable == 1)
return map2(f, args->elts[0]); return map2(f, args->elts[0]);
std::vector<BoxIterator> args_it; std::vector<BoxIterator, StlCompatAllocator<BoxIterator>> args_it;
std::vector<BoxIterator> args_end; std::vector<BoxIterator, StlCompatAllocator<BoxIterator>> args_end;
for (auto e : *args) { for (auto e : *args) {
auto range = e->pyElements(); auto range = e->pyElements();
...@@ -561,12 +561,12 @@ Box* zip(BoxedTuple* containers) { ...@@ -561,12 +561,12 @@ Box* zip(BoxedTuple* containers) {
if (containers->size() == 0) if (containers->size() == 0)
return rtn; return rtn;
std::vector<llvm::iterator_range<BoxIterator>> ranges; std::vector<llvm::iterator_range<BoxIterator>, StlCompatAllocator<llvm::iterator_range<BoxIterator>>> ranges;
for (auto container : *containers) { for (auto container : *containers) {
ranges.push_back(container->pyElements()); ranges.push_back(container->pyElements());
} }
std::vector<BoxIterator> iterators; std::vector<BoxIterator, StlCompatAllocator<BoxIterator>> iterators;
for (auto range : ranges) { for (auto range : ranges) {
iterators.push_back(range.begin()); iterators.push_back(range.begin());
} }
......
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