* xmlHashCreateDict: * @size: the size of the hash table * @dict: a dictionary to use for the hash * * Create a new hash table backed by a dictionary. This can reduce * resource usage considerably if most keys passed to API functions * originate from this dictionary. * * Returns the newly created object, or NULL if a memory allocation failed. */
| 206 | * Returns the newly created object, or NULL if a memory allocation failed. |
| 207 | */ |
| 208 | xmlHashTablePtr |
| 209 | xmlHashCreateDict(int size, xmlDictPtr dict) { |
| 210 | xmlHashTablePtr hash; |
| 211 | |
| 212 | hash = xmlHashCreate(size); |
| 213 | if (hash != NULL) { |
| 214 | hash->dict = dict; |
| 215 | xmlDictReference(dict); |
| 216 | } |
| 217 | return(hash); |
| 218 | } |
| 219 | |
| 220 | /** |
| 221 | * xmlHashFree: |
no test coverage detected