Skip to main content

hash_add_entry

Function hash_add_entry 

Source
pub unsafe fn hash_add_entry(
    table: *mut HashTable,
    name: *const xmlChar,
    userdata: *mut c_void,
) -> c_int
Expand description

Add an entry with a single key.

§UPSTREAM-PARITY

int xmlHashAddEntry(xmlHashTablePtr table, const xmlChar *name, void *userdata);

Returns 0 on success, -1 if the key already exists or on failure.

§SAFETY

  • table must be a valid pointer to a HashTable, or NULL.
  • name must be a valid null-terminated string.