MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlHashUpdateEntry

Function xmlHashUpdateEntry

ThirdParty/libxml2/vtklibxml2/hash.c:758–768  ·  view source on GitHub ↗

* xmlHashUpdateEntry: * @hash: hash table * @key: string key * @payload: pointer to the payload * @dealloc: deallocator function for replaced item or NULL * * Add a hash table entry. If an entry with this key already exists, * the old payload will be freed and updated with the new value. * * Returns 0 in case of success, -1 if a memory allocation failed. */

Source from the content-addressed store, hash-verified

756 * Returns 0 in case of success, -1 if a memory allocation failed.
757 */
758int
759xmlHashUpdateEntry(xmlHashTablePtr hash, const xmlChar *key,
760 void *payload, xmlHashDeallocator dealloc) {
761 int res = xmlHashUpdateInternal(hash, key, NULL, NULL, payload,
762 dealloc, 1);
763
764 if (res == 1)
765 res = 0;
766
767 return(res);
768}
769
770/**
771 * xmlHashUpdateEntry2:

Callers 1

xmlXPathRegisterNsFunction · 0.85

Calls 1

xmlHashUpdateInternalFunction · 0.85

Tested by

no test coverage detected