diff options
| author | Guido van Rossum <guido@python.org> | 1996-08-21 17:41:54 +0000 |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 1996-08-21 17:41:54 +0000 |
| commit | 6cdc6f41465e88344b5ed62e45b036cf502f3770 (patch) | |
| tree | f601508b8e5d36d8672f1344a90924db482fd702 /Include/abstract.h | |
| parent | c9fb47ef084709783baf77a5ccfd3c6b4ecf9434 (diff) | |
| download | cpython-git-6cdc6f41465e88344b5ed62e45b036cf502f3770.tar.gz | |
Added PyObject_DelItem and PySequence_Del{Item,Slice}.
Diffstat (limited to 'Include/abstract.h')
| -rw-r--r-- | Include/abstract.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Include/abstract.h b/Include/abstract.h index 53b419320e..956ca89017 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)); /* |
