From 0e5c48a9171fd0182f67929b82c4b539c5356736 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 12 Jan 2013 21:22:18 -0500 Subject: [PATCH] make deque_clear void, since it's infallible --- Modules/_collectionsmodule.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c index 1ff95fff510..ee17f4f28c5 100644 --- a/Modules/_collectionsmodule.c +++ b/Modules/_collectionsmodule.c @@ -588,7 +588,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; @@ -601,7 +601,6 @@ deque_clear(dequeobject *deque) assert(deque->leftblock == deque->rightblock && deque->leftindex - 1 == deque->rightindex && deque->len == 0); - return 0; } static PyObject * @@ -704,10 +703,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; }