Skip to main content

Module hash

Module hash 

Source
Expand description

Hash table — public xmlHash API (§85 Phase 1).

Implements libxml2’s hash table, used for DTD element/attribute tables, XPath function lookup, catalog entries, and more.

§UPSTREAM-PARITY

The hash table supports:

  • Single-key, 2-key, and 3-key lookups
  • Custom deallocator and copier functions
  • Dictionary-backed keys (for memory efficiency)
  • Scanning with callback functions
  • Copying with custom copier

§Phase 1 status

Complete — all hash table operations are implemented.

Structs§

HashTable
The hash table struct.

Functions§

hash_add_entry
Add an entry with a single key.
hash_add_entry2
Add an entry with two keys.
hash_add_entry3
Add an entry with three keys.
hash_copy
Copy a hash table.
hash_create
Create a new hash table.
hash_create_dict
Create a hash table with dictionary-backed keys.
hash_free
Free a hash table.
hash_lookup
Look up an entry by single key.
hash_lookup2
Look up an entry by two keys.
hash_lookup3
Look up an entry by three keys.
hash_remove_entry
Remove an entry by single key.
hash_remove_entry2
Remove an entry by two keys.
hash_remove_entry3
Remove an entry by three keys.
hash_scan
Scan all entries with a scanner function.
hash_scan_full
Scan all entries with a full scanner function (includes all keys).
hash_size
Get the number of entries in the hash table.
hash_update_entry
Update an entry (add or replace).
hash_update_entry2
Update an entry with two keys.
hash_update_entry3
Update an entry with three keys.