[Python-checkins] cpython: Minor tweak to the order of variable updates.

raymond.hettinger python-checkins at python.org
Sun Sep 27 06:11:19 CEST 2015


https://hg.python.org/cpython/rev/ef71fea740a6
changeset: 98294:ef71fea740a6
user: Raymond Hettinger <python at rcn.com>
date: Sat Sep 26 21:11:05 2015 -0700
summary:
 Minor tweak to the order of variable updates.
files:
 Modules/_collectionsmodule.c | 4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c
--- a/Modules/_collectionsmodule.c
+++ b/Modules/_collectionsmodule.c
@@ -315,8 +315,8 @@
 MARK_END(b->rightlink);
 deque->rightindex = -1;
 }
+ Py_SIZE(deque)++;
 Py_INCREF(item);
- Py_SIZE(deque)++;
 deque->rightindex++;
 deque->rightblock->data[deque->rightindex] = item;
 deque_trim_left(deque);
@@ -340,8 +340,8 @@
 MARK_END(b->leftlink);
 deque->leftindex = BLOCKLEN;
 }
+ Py_SIZE(deque)++;
 Py_INCREF(item);
- Py_SIZE(deque)++;
 deque->leftindex--;
 deque->leftblock->data[deque->leftindex] = item;
 deque_trim_right(deque);
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /