summaryrefslogtreecommitdiffstats
path: root/Objects/listobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-06-17 12:35:49 (GMT)
committerGuido van Rossum <guido@python.org>1993-06-17 12:35:49 (GMT)
commit234f942aefb779efa6cfb7225e21d16a3f7e80f7 (patch)
tree9c85e1ae919ebb44c0a1ca48bdfd11d5f60c7d9c /Objects/listobject.c
parent6a0e2282c359801bd70742642d24f7b0b74f5b4e (diff)
downloadcpython-234f942aefb779efa6cfb7225e21d16a3f7e80f7.zip
cpython-234f942aefb779efa6cfb7225e21d16a3f7e80f7.tar.gz
cpython-234f942aefb779efa6cfb7225e21d16a3f7e80f7.tar.bz2
* Added gmtime/localtime/mktime and SYSV timezone globals to timemodule.c.
Added $(SYSDEF) to its build rule in Makefile. * cgensupport.[ch], modsupport.[ch]: removed some old stuff. Also changed files that still used it... And made several things static that weren't but should have been... And other minor cleanups... * listobject.[ch]: add external interfaces {set,get}listslice * socketmodule.c: fix bugs in new send() argument parsing. * sunaudiodevmodule.c: added flush() and close().
Diffstat (limited to 'Objects/listobject.c')
-rw-r--r--Objects/listobject.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/Objects/listobject.c b/Objects/listobject.c
index 9a1fe23..b51e3d8 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -207,7 +207,7 @@ list_print(op, fp, flags)
return 0;
}
-object *
+static object *
list_repr(v)
listobject *v;
{
@@ -291,6 +291,18 @@ list_slice(a, ilow, ihigh)
return (object *)np;
}
+object *
+getlistslice(a, ilow, ihigh)
+ object *a;
+ int ilow, ihigh;
+{
+ if (!is_listobject(a)) {
+ err_badcall();
+ return NULL;
+ }
+ return list_slice((listobject *)a, ilow, ihigh);
+}
+
static object *
list_concat(a, bb)
listobject *a;
@@ -422,6 +434,19 @@ list_ass_slice(a, ilow, ihigh, v)
#undef b
}
+int
+setlistslice(a, ilow, ihigh, v)
+ object *a;
+ int ilow, ihigh;
+ object *v;
+{
+ if (!is_listobject(a)) {
+ err_badcall();
+ return NULL;
+ }
+ return list_ass_slice((listobject *)a, ilow, ihigh, v);
+}
+
static int
list_ass_item(a, i, v)
listobject *a;