mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
bpo-40602: Write unit tests for _Py_hashtable_t (GH-20091)
Cleanup also hashtable.c. Rename _Py_hashtable_t members: * Rename entries to nentries * Rename num_buckets to nbuckets
This commit is contained in:
parent
f2c3b6823b
commit
a482dc500b
4 changed files with 151 additions and 120 deletions
|
|
@ -312,7 +312,7 @@ w_ref(PyObject *v, char *flag, WFILE *p)
|
|||
w_long(w, p);
|
||||
return 1;
|
||||
} else {
|
||||
size_t s = p->hashtable->entries;
|
||||
size_t s = p->hashtable->nentries;
|
||||
/* we don't support long indices */
|
||||
if (s >= 0x7fffffff) {
|
||||
PyErr_SetString(PyExc_ValueError, "too many objects");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue