Kaydet (Commit) 0443ac28 authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Eliminate unnecessary test

üst 8ab4169f
...@@ -530,7 +530,7 @@ deque_copy(PyObject *deque) ...@@ -530,7 +530,7 @@ deque_copy(PyObject *deque)
return NULL; return NULL;
new_deque->maxlen = old_deque->maxlen; new_deque->maxlen = old_deque->maxlen;
/* Fast path for the deque_repeat() common case where len(deque) == 1 */ /* Fast path for the deque_repeat() common case where len(deque) == 1 */
if (Py_SIZE(deque) == 1 && new_deque->maxlen != 0) { if (Py_SIZE(deque) == 1) {
PyObject *item = old_deque->leftblock->data[old_deque->leftindex]; PyObject *item = old_deque->leftblock->data[old_deque->leftindex];
rv = deque_append(new_deque, item); rv = deque_append(new_deque, item);
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment