summaryrefslogtreecommitdiffstats
path: root/Objects/weakrefobject.c
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2007-08-30 22:57:53 (GMT)
committerThomas Wouters <thomas@python.org>2007-08-30 22:57:53 (GMT)
commitd2cf20eea2338a0369d4a5707adb01b201f7dfb2 (patch)
tree59fd4a094906997ae2b0cd520ff09010457da680 /Objects/weakrefobject.c
parent582b5866174d20f7c027cbb6fb757fefb382f96f (diff)
downloadcpython-d2cf20eea2338a0369d4a5707adb01b201f7dfb2.zip
cpython-d2cf20eea2338a0369d4a5707adb01b201f7dfb2.tar.gz
cpython-d2cf20eea2338a0369d4a5707adb01b201f7dfb2.tar.bz2
Remove the simple slicing API. All slicing is now done with slice objects.
Diffstat (limited to 'Objects/weakrefobject.c')
-rw-r--r--Objects/weakrefobject.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c
index 8c324f3..c3d3ff0 100644
--- a/Objects/weakrefobject.c
+++ b/Objects/weakrefobject.c
@@ -520,22 +520,6 @@ proxy_dealloc(PyWeakReference *self)
/* sequence slots */
-static PyObject *
-proxy_slice(PyWeakReference *proxy, Py_ssize_t i, Py_ssize_t j)
-{
- if (!proxy_checkref(proxy))
- return NULL;
- return PySequence_GetSlice(PyWeakref_GET_OBJECT(proxy), i, j);
-}
-
-static int
-proxy_ass_slice(PyWeakReference *proxy, Py_ssize_t i, Py_ssize_t j, PyObject *value)
-{
- if (!proxy_checkref(proxy))
- return -1;
- return PySequence_SetSlice(PyWeakref_GET_OBJECT(proxy), i, j, value);
-}
-
static int
proxy_contains(PyWeakReference *proxy, PyObject *value)
{
@@ -628,9 +612,9 @@ static PySequenceMethods proxy_as_sequence = {
0, /*sq_concat*/
0, /*sq_repeat*/
0, /*sq_item*/
- (ssizessizeargfunc)proxy_slice, /*sq_slice*/
+ 0, /*sq_slice*/
0, /*sq_ass_item*/
- (ssizessizeobjargproc)proxy_ass_slice, /*sq_ass_slice*/
+ 0, /*sq_ass_slice*/
(objobjproc)proxy_contains, /* sq_contains */
};