Function: internal--hash-table-buckets
internal--hash-table-buckets is a function defined in fns.c.
Signature
(internal--hash-table-buckets HASH-TABLE)
Documentation
(KEY . HASH) in HASH-TABLE, grouped by bucket.
Internal use only.
Source Code
// Defined in /usr/src/emacs/src/fns.c
{
struct Lisp_Hash_Table *h = check_hash_table (hash_table);
Lisp_Object ret = Qnil;
ptrdiff_t index_size = hash_table_index_size (h);
for (ptrdiff_t i = 0; i < index_size; i++)
{
Lisp_Object bucket = Qnil;
for (ptrdiff_t j = HASH_INDEX (h, i); j != -1; j = HASH_NEXT (h, j))
bucket = Fcons (Fcons (HASH_KEY (h, j), make_int (HASH_HASH (h, j))),
bucket);
if (!NILP (bucket))
ret = Fcons (Fnreverse (bucket), ret);
}
return Fnreverse (ret);
}