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

Function xmlHashAddEntry

ThirdParty/libxml2/vtklibxml2/hash.c:680–690  ·  view source on GitHub ↗

* xmlHashAddEntry: * @hash: hash table * @key: string key * @payload: pointer to the payload * * Add a hash table entry. If an entry with this key already exists, * payload will not be updated and -1 is returned. This return value * can't be distinguished from out-of-memory errors, so this function * should be used with care. * * NOTE: This function doesn't allow to distinguish malloc fa

Source from the content-addressed store, hash-verified

678 * Returns 0 on success and -1 in case of error.
679 */
680int
681xmlHashAddEntry(xmlHashTablePtr hash, const xmlChar *key, void *payload) {
682 int res = xmlHashUpdateInternal(hash, key, NULL, NULL, payload, NULL, 0);
683
684 if (res == 0)
685 res = -1;
686 else if (res == 1)
687 res = 0;
688
689 return(res);
690}
691
692/**
693 * xmlHashAddEntry2:

Callers 15

xmlFetchXMLCatalogFileFunction · 0.85
xmlParseSGMLCatalogFunction · 0.85
xmlACatalogAddFunction · 0.85
xmlAddIDInternalFunction · 0.85
xmlXPathDistinctSortedFunction · 0.85
xmlParseCRNG_bindPrefixFunction · 0.85
xmlSchemaBucketCreateFunction · 0.85
xmlSchemaAddComponentsFunction · 0.85
entityDeclDebugFunction · 0.85

Calls 1

xmlHashUpdateInternalFunction · 0.85

Tested by 1

entityDeclDebugFunction · 0.68