summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1992-01-14 18:45:33 (GMT)
committerGuido van Rossum <guido@python.org>1992-01-14 18:45:33 (GMT)
commit7c36ad7f449c54b8fc445aea28d17bf87fa6f2ea (patch)
tree14fa8d1e5d6f0f535e0193de29f781cec4cff798 /Objects
parent11c03836a29b5b2666e3026800de32a3193f99ea (diff)
downloadcpython-7c36ad7f449c54b8fc445aea28d17bf87fa6f2ea.zip
cpython-7c36ad7f449c54b8fc445aea28d17bf87fa6f2ea.tar.gz
cpython-7c36ad7f449c54b8fc445aea28d17bf87fa6f2ea.tar.bz2
New function gettupleslice(v, i, j).
Diffstat (limited to 'Objects')
-rw-r--r--Objects/tupleobject.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c
index bce7fdf..ab2cf18 100644
--- a/Objects/tupleobject.c
+++ b/Objects/tupleobject.c
@@ -228,6 +228,18 @@ tupleslice(a, ilow, ihigh)
return (object *)np;
}
+object *
+gettupleslice(op, i, j)
+ object *op;
+ int i, j;
+{
+ if (op == NULL || !is_tupleobject(op)) {
+ err_badcall();
+ return NULL;
+ }
+ return tupleslice((tupleobject *)op, i, j);
+}
+
static object *
tupleconcat(a, bb)
register tupleobject *a;