[Python-checkins] cpython: Add assertion to verify the pre-condition in the comments.
raymond.hettinger
python-checkins at python.org
Tue Nov 17 23:58:35 EST 2015
https://hg.python.org/cpython/rev/9d8eda95dd00
changeset: 99200:9d8eda95dd00
user: Raymond Hettinger <python at rcn.com>
date: Tue Nov 17 20:58:43 2015 -0800
summary:
Add assertion to verify the pre-condition in the comments.
files:
Objects/setobject.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/Objects/setobject.c b/Objects/setobject.c
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -269,6 +269,7 @@
size_t i = (size_t)hash & mask;
size_t j;
+ assert(so->fill == so->used);
while (1) {
entry = &table[i];
if (entry->key == NULL)
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list