make deque_clear void, since it's infallible
This commit is contained in:
parent
db5012ab47
commit
0e5c48a917
|
@ -588,7 +588,7 @@ deque_remove(dequeobject *deque, PyObject *value)
|
||||||
PyDoc_STRVAR(remove_doc,
|
PyDoc_STRVAR(remove_doc,
|
||||||
"D.remove(value) -- remove first occurrence of value.");
|
"D.remove(value) -- remove first occurrence of value.");
|
||||||
|
|
||||||
static int
|
static void
|
||||||
deque_clear(dequeobject *deque)
|
deque_clear(dequeobject *deque)
|
||||||
{
|
{
|
||||||
PyObject *item;
|
PyObject *item;
|
||||||
|
@ -601,7 +601,6 @@ deque_clear(dequeobject *deque)
|
||||||
assert(deque->leftblock == deque->rightblock &&
|
assert(deque->leftblock == deque->rightblock &&
|
||||||
deque->leftindex - 1 == deque->rightindex &&
|
deque->leftindex - 1 == deque->rightindex &&
|
||||||
deque->len == 0);
|
deque->len == 0);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
|
@ -704,10 +703,7 @@ deque_ass_item(dequeobject *deque, Py_ssize_t i, PyObject *v)
|
||||||
static PyObject *
|
static PyObject *
|
||||||
deque_clearmethod(dequeobject *deque)
|
deque_clearmethod(dequeobject *deque)
|
||||||
{
|
{
|
||||||
int rv;
|
deque_clear(deque);
|
||||||
|
|
||||||
rv = deque_clear(deque);
|
|
||||||
assert (rv != -1);
|
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue