summaryrefslogtreecommitdiffstats
path: root/Include/abstract.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-08-21 17:41:54 (GMT)
committerGuido van Rossum <guido@python.org>1996-08-21 17:41:54 (GMT)
commit6cdc6f41465e88344b5ed62e45b036cf502f3770 (patch)
treef601508b8e5d36d8672f1344a90924db482fd702 /Include/abstract.h
parentc9fb47ef084709783baf77a5ccfd3c6b4ecf9434 (diff)
downloadcpython-6cdc6f41465e88344b5ed62e45b036cf502f3770.zip
cpython-6cdc6f41465e88344b5ed62e45b036cf502f3770.tar.gz
cpython-6cdc6f41465e88344b5ed62e45b036cf502f3770.tar.bz2
Added PyObject_DelItem and PySequence_Del{Item,Slice}.
Diffstat (limited to 'Include/abstract.h')
-rw-r--r--Include/abstract.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/Include/abstract.h b/Include/abstract.h
index 53b4193..956ca89 100644
--- a/Include/abstract.h
+++ b/Include/abstract.h
@@ -410,6 +410,13 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
statement: o[key]=v.
*/
+ int PyObject_DelItem Py_PROTO((PyObject *o, PyObject *key));
+
+ /*
+ Delete the mapping for key from *o. Returns -1 on failure.
+ This is the equivalent of the Python statement: del o[key].
+ */
+
/* Number Protocol:*/
@@ -672,6 +679,14 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
*/
+ int PySequence_DelItem Py_PROTO((PyObject *o, int i));
+
+ /*
+ Delete the ith element of object v. Returns
+ -1 on failure. This is the equivalent of the Python
+ statement: del o[i].
+ */
+
int PySequence_SetSlice Py_PROTO((PyObject *o, int i1, int i2, PyObject *v));
/*
@@ -680,6 +695,14 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/
equivalent of the Python statement: o[i1:i2]=v.
*/
+ int PySequence_DelSlice Py_PROTO((PyObject *o, int i1, int i2));
+
+ /*
+ Delete the slice in sequence object, o, from i1 to i2.
+ Returns -1 on failure. This is the equivalent of the Python
+ statement: del o[i1:i2].
+ */
+
PyObject *PySequence_Tuple Py_PROTO((PyObject *o));
/*