Lines Matching defs:table
167 hashtable_cb(_Py_hashtable_t *table,
183 _Py_hashtable_t *table = _Py_hashtable_new(hash_char,
185 if (table == NULL) {
189 // Using an newly allocated table must not crash
190 assert(table->nentries == 0);
191 assert(table->nbuckets > 0);
192 assert(_Py_hashtable_get(table, TO_PTR('x')) == NULL);
198 if (_Py_hashtable_set(table, TO_PTR(key), TO_PTR(value)) < 0) {
199 _Py_hashtable_destroy(table);
203 assert(table->nentries == 26);
204 assert(table->nbuckets > table->nentries);
208 _Py_hashtable_entry_t *entry = _Py_hashtable_get_entry(table, TO_PTR(key));
216 void *value_ptr = _Py_hashtable_get(table, TO_PTR(key));
222 void *value_ptr = _Py_hashtable_steal(table, TO_PTR(key));
224 assert(table->nentries == 25);
225 assert(_Py_hashtable_get_entry(table, TO_PTR(key)) == NULL);
229 int res = _Py_hashtable_foreach(table, hashtable_cb, &count);
234 _Py_hashtable_clear(table);
235 assert(table->nentries == 0);
236 assert(table->nbuckets > 0);
237 assert(_Py_hashtable_get(table, TO_PTR('x')) == NULL);
239 _Py_hashtable_destroy(table);