Commit 84c76f52 authored by Guido van Rossum's avatar Guido van Rossum

Added external interface to sort a list.

parent 726749cc
......@@ -453,6 +453,21 @@ listsort(self, args)
return None;
}
int
sortlist(v)
object *v;
{
if (v == NULL || !is_listobject(v)) {
err_badcall();
return -1;
}
v = listsort((listobject *)v, (object *)NULL);
if (v == NULL)
return -1;
DECREF(v);
return 0;
}
static struct methodlist list_methods[] = {
{"append", listappend},
{"insert", listinsert},
......
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