|
ReactOS 0.4.16-dev-2207-geb15453
|
#include "libxml.h"#include <limits.h>#include <string.h>#include <time.h>#include "private/dict.h"#include "private/threads.h"#include <libxml/parser.h>#include <libxml/dict.h>#include <libxml/xmlmemory.h>#include <libxml/xmlstring.h>
Go to the source code of this file.
Classes | |
| struct | _xmlDictStrings |
| struct | _xmlDict |
Macros | |
| #define | IN_LIBXML |
| #define | SIZE_MAX ((size_t) -1) |
| #define | MAX_FILL_NUM 7 |
| #define | MAX_FILL_DENOM 8 |
| #define | MIN_HASH_SIZE 8 |
| #define | MAX_HASH_SIZE (1u << 31) |
| #define | HASH_ROL31(x, n) ((x) << (n) | ((x) & 0x7FFFFFFF) >> (31 - (n))) |
Typedefs | |
| typedef struct _xmlDictStrings | xmlDictStrings |
| typedef xmlDictStrings * | xmlDictStringsPtr |
| typedef xmlHashedString | xmlDictEntry |
Variables | |
| static xmlMutex | xmlDictMutex |
and add it to the dictionary if | |
it wasn't found. Returns the interned copy of the string or NULL if a memory allocation failed. | |
| static xmlMutex | xmlRngMutex |
| static unsigned | globalRngState [2] |
| const xmlChar * | xmlDictQLookup (xmlDictPtr dict, const xmlChar *prefix, const xmlChar *name) |
| ATTRIBUTE_NO_SANITIZE_INTEGER void | xmlInitRandom (void) |
| void | xmlCleanupRandom (void) |
| static ATTRIBUTE_NO_SANITIZE_INTEGER unsigned | xoroshiro64ss (unsigned *s) |
| unsigned | xmlRandom (void) |
| typedef xmlHashedString xmlDictEntry |
| typedef struct _xmlDictStrings xmlDictStrings |
| typedef xmlDictStrings* xmlDictStringsPtr |
xmlCleanupDictInternal:
Free the dictionary mutex.
Definition at line 121 of file dict.c.
Referenced by xmlCleanupParser().
|
static |
Definition at line 204 of file dict.c.
Referenced by xmlDictLookupInternal().
|
static |
Definition at line 136 of file dict.c.
Referenced by xmlDictLookupInternal().
| ATTRIBUTE_NO_SANITIZE_INTEGER unsigned xmlDictCombineHash | ( | unsigned | v1, |
| unsigned | v2 | ||
| ) |
Definition at line 521 of file dict.c.
Referenced by xmlParseStartTag2().
Definition at line 512 of file dict.c.
Referenced by xmlParserNsLookupSax(), and xmlParserNsUpdateSax().
| xmlDictPtr xmlDictCreate | ( | void | ) |
xmlDictCreate:
Create a new dictionary
Returns the newly created dictionary, or NULL if an error occurred.
Definition at line 262 of file dict.c.
Referenced by xmlDictCreateSub(), xmlInitSAXParserCtxt(), 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 297 of file dict.c.
Referenced by xsltNewTransformContext().
Definition at line 872 of file dict.c.
|
static |
Definition at line 547 of file dict.c.
Referenced by xmlDictLookupInternal().
| 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 333 of file dict.c.
Referenced by xmlDictFree(), xmlFreeParserCtxt(), xmlHashFree(), xmlParseBalancedChunkMemoryInternal(), xmlParseExternalEntityPrivate(), xmlParseInNodeContext(), xslt_doc_default_loader(), 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: dictionary @size: new size of the dictionary
Resize the dictionary hash table.
Returns 0 in case of success, -1 if a memory allocation failed.
Definition at line 609 of file dict.c.
Referenced by xmlDictLookupInternal().
|
static |
Definition at line 464 of file dict.c.
Referenced by xmlDictComputeHash(), and xmlDictLookupInternal().
|
static |
Definition at line 483 of file dict.c.
Referenced by xmlDictLookupInternal().
Definition at line 824 of file dict.c.
Referenced by xmlAddAttributeDecl(), xmlAddID(), xmlCopyDocElementContent(), xmlDetectSAX2(), xmlHashUpdateInternal(), xmlNewDocElementContent(), xmlParseBalancedChunkMemoryInternal(), xmlParseExternalEntityPrivate(), xmlParseName(), xmlParseNameComplex(), xmlParseReference(), 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().
| xmlHashedString xmlDictLookupHashed | ( | xmlDictPtr | dict, |
| const xmlChar * | name, | ||
| int | len | ||
| ) |
Definition at line 845 of file dict.c.
Referenced by xmlAddDefAttrs(), xmlParseInNodeContext(), xmlParseNCName(), xmlParseNCNameComplex(), xmlParseQNameHashed(), and xmlParseStartTag2().
|
static |
Definition at line 678 of file dict.c.
Referenced by xmlDictExists(), xmlDictLookup(), xmlDictLookupHashed(), and xmlDictQLookup().
| 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 376 of file dict.c.
Referenced by xmlDictOwns(), xmlFreeAttribute(), xmlFreeDocElementContent(), xmlHashUpdateInternal(), xmlParseEnumerationType(), xmlParseNotationType(), xmlSAX2ExternalSubset(), xmlSAX2Text(), xsltAttrListTemplateProcess(), xsltAttrTemplateProcess(), xsltCopyText(), xsltParseTemplateContent(), and xsltPreprocessStylesheet().
Definition at line 894 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 317 of file dict.c.
Referenced by xmlDictCreateSub(), xmlHashCreateDict(), xmlParseBalancedChunkMemoryInternal(), xmlParseExternalEntityPrivate(), xmlSAX2StartDocument(), xslt_doc_default_loader(), 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 421 of file dict.c.
Referenced by xmlCtxtUseOptionsInternal(), and xmlInitSAXParserCtxt().
| 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
xmlInitDictInternal:
Initialize mutex.
Definition at line 99 of file dict.c.
Referenced by xmlInitParser().
xmlInitializeDict:
DEPRECATED: Alias for xmlInitParser.
Returns 0.
| ATTRIBUTE_NO_SANITIZE_INTEGER void xmlInitRandom | ( | void | ) |
Definition at line 918 of file dict.c.
Referenced by xmlInitParser(), and xmlInitRandom().
Definition at line 951 of file dict.c.
Referenced by xmlDictCreate(), and xmlHashCreate().
|
static |
Definition at line 938 of file dict.c.
Referenced by xmlRandom().
|
static |
Definition at line 909 of file dict.c.
Referenced by xmlInitRandom(), and xmlRandom().
|
static |
Definition at line 78 of file dict.c.
Referenced by xmlCleanupDictInternal(), xmlDictFree(), xmlDictReference(), and xmlInitDictInternal().
|
static |
Definition at line 907 of file dict.c.
Referenced by xmlCleanupRandom(), xmlInitRandom(), and xmlRandom().