* xmlDictCreateSub: * @sub: an existing dictionary * * Create a new dictionary, inheriting strings from the read-only * dictionary @sub. On lookup, strings are first searched in the * new dictionary, then in @sub, and if not found are created in the * new dictionary. * * Returns the newly created dictionary, or NULL if an error occurred. */
| 296 | * Returns the newly created dictionary, or NULL if an error occurred. |
| 297 | */ |
| 298 | xmlDictPtr |
| 299 | xmlDictCreateSub(xmlDictPtr sub) { |
| 300 | xmlDictPtr dict = xmlDictCreate(); |
| 301 | |
| 302 | if ((dict != NULL) && (sub != NULL)) { |
| 303 | dict->seed = sub->seed; |
| 304 | dict->subdict = sub; |
| 305 | xmlDictReference(dict->subdict); |
| 306 | } |
| 307 | return(dict); |
| 308 | } |
| 309 | |
| 310 | /** |
| 311 | * xmlDictReference: |
nothing calls this directly
no test coverage detected