ReactOS 0.4.16-dev-550-g2186ce3
|
#include "libxml.h"
#include <limits.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#include <stdint.h>
#include <libxml/tree.h>
#include <libxml/dict.h>
#include <libxml/xmlmemory.h>
#include <libxml/xmlerror.h>
#include <libxml/globals.h>
Go to the source code of this file.
Classes | |
struct | _xmlDictEntry |
struct | _xmlDictStrings |
struct | _xmlDict |
Macros | |
#define | IN_LIBXML |
#define | DICT_RANDOMIZATION |
#define | MAX_HASH_LEN 3 |
#define | MIN_DICT_SIZE 128 |
#define | MAX_DICT_HASH 8 * 2048 |
#define | WITH_BIG_KEY |
#define | xmlDictComputeKey(dict, name, len) |
#define | xmlDictComputeQKey(dict, prefix, plen, name, len) |
Typedefs | |
typedef struct _xmlDictEntry | xmlDictEntry |
typedef xmlDictEntry * | xmlDictEntryPtr |
typedef struct _xmlDictStrings | xmlDictStrings |
typedef xmlDictStrings * | xmlDictStringsPtr |
Variables | |
static xmlMutexPtr | xmlDictMutex = NULL |
static int | xmlDictInitialized = 0 |
typedef struct _xmlDictEntry xmlDictEntry |
typedef xmlDictEntry* xmlDictEntryPtr |
typedef struct _xmlDictStrings xmlDictStrings |
typedef xmlDictStrings* xmlDictStringsPtr |
__xmlInitializeDict:
This function is not public Do the dictionary mutex initialization. this function is not thread safe, initialization should normally be done once at setup when called from xmlOnceInit() we may also land in this code if thread support is not compiled in
Returns 0 if initialization was already done, and 1 if that call led to the initialization
Definition at line 173 of file dict.c.
Referenced by __xmlRandom(), xmlDictCreate(), xmlDictFree(), and xmlDictReference().
Definition at line 195 of file dict.c.
Referenced by xmlDictCreate(), and xmlHashCreate().
|
static |
Definition at line 308 of file dict.c.
Referenced by xmlDictQLookup().
|
static |
Definition at line 244 of file dict.c.
Referenced by xmlDictAddQString(), and xmlDictLookup().
xmlDictCleanup:
DEPRECATED: This function will be made private. Call xmlCleanupParser to free global state but see the warnings there. xmlCleanupParser should be only called once at program exit. In most cases, you don't have call cleanup functions at all.
Free the dictionary mutex. Do not call unless sure the library is not in use anymore !
Definition at line 224 of file dict.c.
Referenced by xmlCleanupParser().
Definition at line 381 of file dict.c.
|
static |
Definition at line 453 of file dict.c.
|
static |
Definition at line 496 of file dict.c.
xmlDictPtr xmlDictCreate | ( | void | ) |
xmlDictCreate:
Create a new dictionary
Returns the newly created dictionary, or NULL if an error occurred.
Definition at line 577 of file dict.c.
Referenced by xmlDictCreateSub(), xmlInitParserCtxt(), and xsltNewStylesheetInternal().
xmlDictPtr xmlDictCreateSub | ( | xmlDictPtr | sub | ) |
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.
Definition at line 624 of file dict.c.
Referenced by xsltNewTransformContext().
Definition at line 1007 of file dict.c.
void xmlDictFree | ( | xmlDictPtr | dict | ) |
xmlDictFree: @dict: the dictionary
Free the hash @dict and its contents. The userdata is deallocated with @f if provided.
Definition at line 802 of file dict.c.
Referenced by xmlDictFree(), xmlFreeParserCtxt(), xmlHashFree(), xmlParseBalancedChunkMemoryInternal(), xmlParseExternalEntityPrivate(), xmlParseInNodeContext(), xsltDocDefaultLoaderFunc(), xsltFreeStylesheet(), xsltFreeTransformContext(), and xsltParseStylesheetUser().
size_t xmlDictGetUsage | ( | xmlDictPtr | dict | ) |
xmlDictGetUsage: @dict: the dictionary
Get how much memory is used by a dictionary for strings Added in 2.9.0
Returns the amount of strings allocated
|
static |
xmlDictGrow: @dict: the dictionary @size: the new size of the dictionary
resize the dictionary
Returns 0 in case of success, -1 in case of failure
Definition at line 669 of file dict.c.
Referenced by xmlDictLookup(), and xmlDictQLookup().
Definition at line 867 of file dict.c.
Referenced by xmlAddAttributeDecl(), xmlAddDefAttrs(), xmlAddID(), xmlCopyDocElementContent(), xmlDetectSAX2(), xmlDictQLookup(), xmlHashAddEntry3(), xmlHashUpdateEntry3(), xmlNewDocElementContent(), xmlParseBalancedChunkMemoryInternal(), xmlParseExternalEntityPrivate(), xmlParseInNodeContext(), xmlParseName(), xmlParseNameComplex(), xmlParseNCName(), xmlParseNCNameComplex(), xmlParseQName(), xmlParseReference(), xmlParseStartTag2(), xmlSAX2TextNode(), xsltAddTemplate(), xsltApplyAttributeSet(), xsltApplyStylesheetInternal(), xsltAttribute(), xsltAttributeComp(), xsltAttrListTemplateProcess(), xsltAttrTemplateProcess(), xsltElement(), xsltElementComp(), xsltEvalStaticAttrValueTemplate(), xsltGetCNsProp(), xsltGetQNameProperty(), xsltGetQNameURI2(), xsltNumberComp(), xsltParseStylesheetAttributeSet(), xsltParseStylesheetTemplate(), xsltParseTemplateContent(), xsltPreprocessStylesheet(), xsltProcessUserParamInternal(), xsltRegisterGlobalVariable(), xsltShallowCopyAttr(), xsltSortComp(), xsltSplitQName(), xsltStackLookup(), and xsltXPathVariableLookup().
int xmlDictOwns | ( | xmlDictPtr | dict, |
const xmlChar * | str | ||
) |
xmlDictOwns: @dict: the dictionary @str: the string
check if a string is owned by the dictionary
Returns 1 if true, 0 if false and -1 in case of error -1 in case of error
Definition at line 1220 of file dict.c.
Referenced by xmlDictOwns(), xmlFreeAttribute(), xmlFreeDocElementContent(), xmlHashAddEntry3(), xmlHashUpdateEntry3(), xmlParseEnumerationType(), xmlParseNotationType(), xmlSAX2ExternalSubset(), xmlSAX2Text(), xsltAttrListTemplateProcess(), xsltAttrTemplateProcess(), xsltCopyText(), xsltParseTemplateContent(), and xsltPreprocessStylesheet().
Definition at line 1115 of file dict.c.
Referenced by xmlSAX2StartElementNs(), xsltApplyStylesheetInternal(), and xsltDocumentElem().
int xmlDictReference | ( | xmlDictPtr | dict | ) |
xmlDictReference: @dict: the dictionary
Increment the reference counter of a dictionary
Returns 0 in case of success and -1 in case of error
Definition at line 647 of file dict.c.
Referenced by xmlDictCreateSub(), xmlHashCreateDict(), xmlParseBalancedChunkMemoryInternal(), xmlParseExternalEntityPrivate(), xmlSAX2StartDocument(), xsltApplyStylesheetInternal(), xsltCreateRVT(), xsltDocDefaultLoaderFunc(), xsltDocumentElem(), xsltLoadStylesheetPI(), and xsltParseStylesheetUser().
size_t xmlDictSetLimit | ( | xmlDictPtr | dict, |
size_t | limit | ||
) |
xmlDictSetLimit: @dict: the dictionary @limit: the limit in bytes
Set a size limit for the dictionary Added in 2.9.0
Returns the previous limit of the dictionary or 0
Definition at line 1265 of file dict.c.
Referenced by xmlCtxtUseOptionsInternal(), and xmlInitParserCtxt().
int xmlDictSize | ( | xmlDictPtr | dict | ) |
xmlDictSize: @dict: the dictionary
Query the number of elements installed in the hash @dict.
Returns the number of elements in the dictionary or -1 in case of error
xmlInitializeDict:
DEPRECATED: This function will be made private. Call xmlInitParser to initialize the library.
Do the dictionary mutex initialization.
Returns 0 if initialization was already done, and 1 if that call led to the initialization
Definition at line 157 of file dict.c.
Referenced by xmlInitParser().
|
static |
Definition at line 135 of file dict.c.
Referenced by __xmlInitializeDict(), __xmlRandom(), xmlDictCleanup(), xmlDictCreate(), xmlDictFree(), and xmlDictReference().
|
static |
Definition at line 130 of file dict.c.
Referenced by __xmlInitializeDict(), __xmlRandom(), xmlDictCleanup(), xmlDictFree(), and xmlDictReference().