make deque_clear void, since it's infallible

This commit is contained in:
Benjamin Peterson 2013-01-12 21:22:18 -05:00
parent eebcb5f790
commit 40056de9f5
1 changed files with 2 additions and 6 deletions

View File

@ -632,7 +632,7 @@ deque_remove(dequeobject *deque, PyObject *value)
PyDoc_STRVAR(remove_doc,
"D.remove(value) -- remove first occurrence of value.");
static int
static void
deque_clear(dequeobject *deque)
{
PyObject *item;
@ -645,7 +645,6 @@ deque_clear(dequeobject *deque)
assert(deque->leftblock == deque->rightblock &&
deque->leftindex - 1 == deque->rightindex &&
deque->len == 0);
return 0;
}
static PyObject *
@ -748,10 +747,7 @@ deque_ass_item(dequeobject *deque, Py_ssize_t i, PyObject *v)
static PyObject *
deque_clearmethod(dequeobject *deque)
{
int rv;
rv = deque_clear(deque);
assert (rv != -1);
deque_clear(deque);
Py_RETURN_NONE;
}