From: Raymond Hettinger Date: Wed, 18 Nov 2015 04:58:43 +0000 (-0800) Subject: Add assertion to verify the pre-condition in the comments. X-Git-Tag: v3.6.0a1~1035 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=66f6238fca7286a3917eab0e9fafd7aa6f8e90a4;p=thirdparty%2FPython%2Fcpython.git Add assertion to verify the pre-condition in the comments. --- diff --git a/Objects/setobject.c b/Objects/setobject.c index 083cbea412f5..7fde01f5999c 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)