[Python-checkins] cpython (3.3): make deque_clear void, since it's infallible
benjamin.peterson
python-checkins at python.org
Sun Jan 13 03:23:09 CET 2013
http://hg.python.org/cpython/rev/623a7de80432
changeset: 81470:623a7de80432
branch: 3.3
parent: 81467:c276fbd95182
user: Benjamin Peterson <benjamin at python.org>
date: Sat Jan 12 21:22:18 2013 -0500
summary:
make deque_clear void, since it's infallible
files:
Modules/_collectionsmodule.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c
--- a/Modules/_collectionsmodule.c
+++ b/Modules/_collectionsmodule.c
@@ -588,7 +588,7 @@
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 @@
assert(deque->leftblock == deque->rightblock &&
deque->leftindex - 1 == deque->rightindex &&
deque->len == 0);
- return 0;
}
static PyObject *
@@ -704,10 +703,7 @@
static PyObject *
deque_clearmethod(dequeobject *deque)
{
- int rv;
-
- rv = deque_clear(deque);
- assert (rv != -1);
+ deque_clear(deque);
Py_RETURN_NONE;
}
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list