diff options
author | Raymond Hettinger <python@rcn.com> | 2015-11-17 20:58:43 -0800 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2015-11-17 20:58:43 -0800 |
commit | 66f6238fca7286a3917eab0e9fafd7aa6f8e90a4 (patch) | |
tree | 385b4fd8663e93c705cd87b5f52840baa3997954 | |
parent | b62226ccc464b2973168b41320fdd05d2ccaf385 (diff) | |
download | cpython-git-66f6238fca7286a3917eab0e9fafd7aa6f8e90a4.tar.gz |
Add assertion to verify the pre-condition in the comments.
-rw-r--r-- | Objects/setobject.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/setobject.c b/Objects/setobject.c index 083cbea412..7fde01f599 100644 --- a/Objects/setobject.c +++ b/Objects/setobject.c @@ -269,6 +269,7 @@ set_insert_clean(PySetObject *so, PyObject *key, Py_hash_t hash) size_t i = (size_t)hash & mask; size_t j; + assert(so->fill == so->used); while (1) { entry = &table[i]; if (entry->key == NULL) |