1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-27 18:50:07 +03:00

parser: Convert xmlParserMaxDepth to macro

This commit is contained in:
Nick Wellnhofer 2025-03-05 14:56:46 +01:00
parent 5b56ed9b81
commit 94d8a3e231
3 changed files with 4 additions and 28 deletions

View File

@ -822,7 +822,7 @@
<exports symbol='XML_SUBSTITUTE_REF' type='macro'/>
<exports symbol='inputPop' type='macro'/>
<exports symbol='inputPush' type='macro'/>
<exports symbol='xmlParserMaxDepth' type='variable'/>
<exports symbol='xmlParserMaxDepth' type='macro'/>
<exports symbol='xmlStringComment' type='variable'/>
<exports symbol='xmlStringText' type='variable'/>
<exports symbol='xmlStringTextNoenc' type='variable'/>
@ -4196,6 +4196,8 @@
<info>Automatically generated by genChRanges.py</info>
<arg name='c' info='char to validate'/>
</macro>
<macro name='xmlParserMaxDepth' file='parserInternals'>
</macro>
<macro name='xmlRootNode' file='tree'>
<info>Macro for compatibility naming layer with libxml1. Maps to &quot;children&quot;.</info>
</macro>
@ -6586,9 +6588,6 @@ crash if you try to modify the tree)'/>
<variable name='xmlMemStrdup' file='xmlmemory' type='xmlStrdupFunc'>
<info>@str: a zero terminated string The variable holding the libxml strdup() implementation Returns the copy of the string or NULL in case of error</info>
</variable>
<variable name='xmlParserMaxDepth' file='parserInternals' type='const unsigned int'>
<info>arbitrary depth limit for the XML documents that we allow to process. This is not a limitation of the parser but a safety boundary feature. It can be disabled with the XML_PARSE_HUGE parser option.</info>
</variable>
<variable name='xmlParserVersion' file='parser' type='const char * const'>
<info>Constant string describing the internal version of the library</info>
</variable>

View File

@ -27,18 +27,7 @@ extern "C" {
*/
#define inputPush xmlCtxtPushInput
#define inputPop xmlCtxtPopInput
/**
* xmlParserMaxDepth:
*
* DEPRECATED: has no effect
*
* arbitrary depth limit for the XML documents that we allow to
* process. This is not a limitation of the parser but a safety
* boundary feature, use XML_PARSE_HUGE option to override it.
*/
XML_DEPRECATED
XMLPUBVAR const unsigned int xmlParserMaxDepth;
#define xmlParserMaxDepth 256
/**
* XML_MAX_TEXT_LENGTH:

View File

@ -161,18 +161,6 @@ xmlParseEntityRefInternal(xmlParserCtxtPtr ctxt);
*/
#define XML_ENT_FIXED_COST 20
/**
* xmlParserMaxDepth:
*
* arbitrary depth limit for the XML documents that we allow to
* process. This is not a limitation of the parser but a safety
* boundary feature. It can be disabled with the XML_PARSE_HUGE
* parser option.
*/
const unsigned int xmlParserMaxDepth = 256;
#define XML_PARSER_BIG_BUFFER_SIZE 300
#define XML_PARSER_BUFFER_SIZE 100
#define SAX_COMPAT_MODE BAD_CAST "SAX compatibility mode document"