summaryrefslogtreecommitdiffstats
path: root/Objects/listobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/listobject.c')
-rw-r--r--Objects/listobject.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/Objects/listobject.c b/Objects/listobject.c
index 5c3d0ed..9c9ed75 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -427,6 +427,7 @@ list_ass_slice(a, ilow, ihigh, v)
else { /* Insert d items; recycle ihigh-ilow items */
RESIZE(item, object *, a->ob_size + d);
if (item == NULL) {
+ XDEL(recycle);
err_nomem();
return -1;
}
@@ -613,6 +614,21 @@ listreverse(self, args)
}
int
+reverselist(v)
+ object *v;
+{
+ if (v == NULL || !is_listobject(v)) {
+ err_badcall();
+ return -1;
+ }
+ v = listreverse((listobject *)v, (object *)NULL);
+ if (v == NULL)
+ return -1;
+ DECREF(v);
+ return 0;
+}
+
+int
sortlist(v)
object *v;
{