Commit 5936a2f9 authored by Stefan Behnel's avatar Stefan Behnel

Fix tests in "libcpp_algo" test as already done in master.

parent 888bc4a4
......@@ -20,8 +20,8 @@ def heapsort(l, bool reverse=False):
cdef vector[int] v = l
if reverse:
make_heap(v.begin(), v.end(), greater)
sort_heap(v.begin(), v.end(), greater)
make_heap(v.begin(), v.end(), &greater)
sort_heap(v.begin(), v.end(), &greater)
else:
make_heap(v.begin(), v.end())
sort_heap(v.begin(), v.end())
......@@ -38,7 +38,7 @@ def partialsort(l, int k, reverse=False):
"""
cdef vector[int] v = l
if reverse:
partial_sort(v.begin(), v.begin() + k, v.end(), greater)
partial_sort(v.begin(), v.begin() + k, v.end(), &greater)
else:
partial_sort(v.begin(), v.begin() + k, v.end())
return v
......@@ -53,7 +53,7 @@ def stdsort(l, reverse=False):
"""
cdef vector[int] v = l
if reverse:
sort(v.begin(), v.end(), greater)
sort(v.begin(), v.end(), &greater)
else:
sort(v.begin(), v.end())
return v
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