mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-19 14:50:07 +03:00
globals: Remove unused globals
- xmlBufferAllocScheme - xmlDefaultBufferSize - xmlParserDebugEntities
This commit is contained in:
parent
92d7b0cd90
commit
696572248f
@ -784,7 +784,6 @@
|
||||
<exports symbol='xmlThrDefKeepBlanksDefaultValue' type='function'/>
|
||||
<exports symbol='xmlThrDefLineNumbersDefaultValue' type='function'/>
|
||||
<exports symbol='xmlThrDefLoadExtDtdDefaultValue' type='function'/>
|
||||
<exports symbol='xmlThrDefParserDebugEntities' type='function'/>
|
||||
<exports symbol='xmlThrDefPedanticParserDefaultValue' type='function'/>
|
||||
<exports symbol='xmlThrDefSubstituteEntitiesDefaultValue' type='function'/>
|
||||
</file>
|
||||
@ -1299,14 +1298,15 @@
|
||||
<summary>interfaces for tree manipulation</summary>
|
||||
<description>this module describes the structures found in an tree resulting from an XML or HTML parsing, as well as the API provided for various processing on that tree </description>
|
||||
<author>Daniel Veillard </author>
|
||||
<exports symbol='BASE_BUFFER_SIZE' type='macro'/>
|
||||
<exports symbol='LIBXML2_NEW_BUFFER' type='macro'/>
|
||||
<exports symbol='XML_GET_CONTENT' type='macro'/>
|
||||
<exports symbol='XML_GET_LINE' type='macro'/>
|
||||
<exports symbol='XML_LOCAL_NAMESPACE' type='macro'/>
|
||||
<exports symbol='XML_XML_ID' type='macro'/>
|
||||
<exports symbol='XML_XML_NAMESPACE' type='macro'/>
|
||||
<exports symbol='xmlBufferAllocScheme' type='macro'/>
|
||||
<exports symbol='xmlChildrenNode' type='macro'/>
|
||||
<exports symbol='xmlDefaultBufferSize' type='macro'/>
|
||||
<exports symbol='xmlRootNode' type='macro'/>
|
||||
<exports symbol='XML_ATTRIBUTE_CDATA' type='enum'/>
|
||||
<exports symbol='XML_ATTRIBUTE_DECL' type='enum'/>
|
||||
@ -1600,8 +1600,6 @@
|
||||
<exports symbol='xmlStringLenGetNodeList' type='function'/>
|
||||
<exports symbol='xmlTextConcat' type='function'/>
|
||||
<exports symbol='xmlTextMerge' type='function'/>
|
||||
<exports symbol='xmlThrDefBufferAllocScheme' type='function'/>
|
||||
<exports symbol='xmlThrDefDefaultBufferSize' type='function'/>
|
||||
<exports symbol='xmlThrDefDeregisterNodeDefault' type='function'/>
|
||||
<exports symbol='xmlThrDefRegisterNodeDefault' type='function'/>
|
||||
<exports symbol='xmlUnlinkNode' type='function'/>
|
||||
@ -3513,9 +3511,6 @@
|
||||
<macro name='BAD_CAST' file='xmlstring'>
|
||||
<info>Macro to cast a string to an xmlChar * when one know its safe.</info>
|
||||
</macro>
|
||||
<macro name='BASE_BUFFER_SIZE' file='tree'>
|
||||
<info>default buffer size 4000.</info>
|
||||
</macro>
|
||||
<macro name='CAST_TO_BOOLEAN' file='xpathInternals'>
|
||||
<info>Macro to try to cast the value on the top of the XPath stack to a boolean.</info>
|
||||
</macro>
|
||||
@ -4138,9 +4133,13 @@
|
||||
</macro>
|
||||
<macro name='valuePush' file='xpathInternals'>
|
||||
</macro>
|
||||
<macro name='xmlBufferAllocScheme' file='tree'>
|
||||
</macro>
|
||||
<macro name='xmlChildrenNode' file='tree'>
|
||||
<info>Macro for compatibility naming layer with libxml1. Maps to "children."</info>
|
||||
</macro>
|
||||
<macro name='xmlDefaultBufferSize' file='tree'>
|
||||
</macro>
|
||||
<macro name='xmlIsBaseCharQ' file='chvalid'>
|
||||
<info>Automatically generated by genChRanges.py</info>
|
||||
<arg name='c' info='char to validate'/>
|
||||
@ -14722,16 +14721,6 @@ crash if you try to modify the tree)'/>
|
||||
<arg name='format' type='const char *' info='format string (see printf)'/>
|
||||
<arg name='argptr' type='va_list' info='pointer to the first member of the variable argument list.'/>
|
||||
</function>
|
||||
<function name='xmlThrDefBufferAllocScheme' file='tree' module='tree'>
|
||||
<info></info>
|
||||
<return type='xmlBufferAllocationScheme' info=''/>
|
||||
<arg name='v' type='xmlBufferAllocationScheme' info=''/>
|
||||
</function>
|
||||
<function name='xmlThrDefDefaultBufferSize' file='tree' module='tree'>
|
||||
<info></info>
|
||||
<return type='int' info=''/>
|
||||
<arg name='v' type='int' info=''/>
|
||||
</function>
|
||||
<function name='xmlThrDefDeregisterNodeDefault' file='tree' module='tree'>
|
||||
<info></info>
|
||||
<return type='xmlDeregisterNodeFunc' info=''/>
|
||||
@ -14773,11 +14762,6 @@ crash if you try to modify the tree)'/>
|
||||
<return type='xmlOutputBufferCreateFilenameFunc' info=''/>
|
||||
<arg name='func' type='xmlOutputBufferCreateFilenameFunc' info=''/>
|
||||
</function>
|
||||
<function name='xmlThrDefParserDebugEntities' file='parser' module='parser'>
|
||||
<info></info>
|
||||
<return type='int' info=''/>
|
||||
<arg name='v' type='int' info=''/>
|
||||
</function>
|
||||
<function name='xmlThrDefParserInputBufferCreateFilenameDefault' file='xmlIO' module='xmlIO'>
|
||||
<info></info>
|
||||
<return type='xmlParserInputBufferCreateFilenameFunc' info=''/>
|
||||
|
39
globals.c
39
globals.c
@ -247,35 +247,10 @@ xmlPosixStrdup(const char *cur) {
|
||||
*/
|
||||
xmlStrdupFunc xmlMemStrdup = xmlPosixStrdup;
|
||||
|
||||
/**
|
||||
* xmlBufferAllocScheme:
|
||||
*
|
||||
* DEPRECATED: Don't use.
|
||||
*
|
||||
* Global setting, default allocation policy for buffers, default is
|
||||
* XML_BUFFER_ALLOC_EXACT
|
||||
*/
|
||||
const xmlBufferAllocationScheme xmlBufferAllocScheme = XML_BUFFER_ALLOC_EXACT;
|
||||
/**
|
||||
* xmlDefaultBufferSize:
|
||||
*
|
||||
* DEPRECATED: Don't use.
|
||||
*
|
||||
* Global setting, default buffer size. Default value is BASE_BUFFER_SIZE
|
||||
*/
|
||||
const int xmlDefaultBufferSize = BASE_BUFFER_SIZE;
|
||||
|
||||
/*
|
||||
* Parser defaults
|
||||
*/
|
||||
|
||||
/**
|
||||
* xmlParserDebugEntities:
|
||||
*
|
||||
* DEPRECATED, always 0.
|
||||
*/
|
||||
const int xmlParserDebugEntities = 0;
|
||||
|
||||
static int xmlDoValidityCheckingDefaultValueThrDef = 0;
|
||||
static int xmlGetWarningsDefaultValueThrDef = 1;
|
||||
static int xmlLoadExtDtdDefaultValueThrDef = 0;
|
||||
@ -905,16 +880,6 @@ xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler) {
|
||||
xmlMutexUnlock(&xmlThrDefMutex);
|
||||
}
|
||||
|
||||
xmlBufferAllocationScheme
|
||||
xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v ATTRIBUTE_UNUSED) {
|
||||
return xmlBufferAllocScheme;
|
||||
}
|
||||
|
||||
int
|
||||
xmlThrDefDefaultBufferSize(int v ATTRIBUTE_UNUSED) {
|
||||
return xmlDefaultBufferSize;
|
||||
}
|
||||
|
||||
int xmlThrDefDoValidityCheckingDefaultValue(int v) {
|
||||
int ret;
|
||||
xmlMutexLock(&xmlThrDefMutex);
|
||||
@ -989,10 +954,6 @@ int xmlThrDefLoadExtDtdDefaultValue(int v) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
int xmlThrDefParserDebugEntities(int v ATTRIBUTE_UNUSED) {
|
||||
return(xmlParserDebugEntities);
|
||||
}
|
||||
|
||||
int xmlThrDefPedanticParserDefaultValue(int v) {
|
||||
int ret;
|
||||
xmlMutexLock(&xmlThrDefMutex);
|
||||
|
@ -974,8 +974,6 @@ XMLPUBVAR const char *const xmlParserVersion;
|
||||
|
||||
/** DOC_DISABLE */
|
||||
XML_DEPRECATED
|
||||
XMLPUBVAR const int xmlParserDebugEntities;
|
||||
XML_DEPRECATED
|
||||
XMLPUBVAR const xmlSAXLocator xmlDefaultSAXLocator;
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
XML_DEPRECATED
|
||||
@ -1095,9 +1093,6 @@ XMLPUBFUN int
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlThrDefLoadExtDtdDefaultValue(int v);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlThrDefParserDebugEntities(int v);
|
||||
|
||||
#ifdef LIBXML_SAX1_ENABLED
|
||||
/*
|
||||
|
@ -32,6 +32,12 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Backward compatibility
|
||||
*/
|
||||
#define xmlBufferAllocScheme XML_BUFFER_ALLOC_EXACT
|
||||
#define xmlDefaultBufferSize 4096
|
||||
|
||||
/*
|
||||
* Some of the basic types pointer to structures:
|
||||
*/
|
||||
@ -59,13 +65,6 @@ typedef xmlSAXHandler *xmlSAXHandlerPtr;
|
||||
typedef struct _xmlEntity xmlEntity;
|
||||
typedef xmlEntity *xmlEntityPtr;
|
||||
|
||||
/**
|
||||
* BASE_BUFFER_SIZE:
|
||||
*
|
||||
* default buffer size 4000.
|
||||
*/
|
||||
#define BASE_BUFFER_SIZE 4096
|
||||
|
||||
/**
|
||||
* LIBXML_NAMESPACE_DICT:
|
||||
*
|
||||
@ -679,11 +678,6 @@ typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node);
|
||||
*/
|
||||
|
||||
/** DOC_DISABLE */
|
||||
XML_DEPRECATED
|
||||
XMLPUBVAR const xmlBufferAllocationScheme xmlBufferAllocScheme;
|
||||
XML_DEPRECATED
|
||||
XMLPUBVAR const int xmlDefaultBufferSize;
|
||||
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN xmlRegisterNodeFunc *__xmlRegisterNodeDefaultValue(void);
|
||||
XML_DEPRECATED
|
||||
@ -1322,11 +1316,6 @@ XML_DEPRECATED
|
||||
XMLPUBFUN xmlDeregisterNodeFunc
|
||||
xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func);
|
||||
|
||||
XML_DEPRECATED XMLPUBFUN xmlBufferAllocationScheme
|
||||
xmlThrDefBufferAllocScheme (xmlBufferAllocationScheme v);
|
||||
XML_DEPRECATED XMLPUBFUN int
|
||||
xmlThrDefDefaultBufferSize (int v);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -391,14 +391,12 @@ deprecated_funcs = {
|
||||
'xmlStringDecodeEntities': True,
|
||||
'xmlStringLenDecodeEntities': True,
|
||||
'xmlSubstituteEntitiesDefault': True,
|
||||
'xmlThrDefDefaultBufferSize': True,
|
||||
'xmlThrDefDoValidityCheckingDefaultValue': True,
|
||||
'xmlThrDefGetWarningsDefaultValue': True,
|
||||
'xmlThrDefIndentTreeOutput': True,
|
||||
'xmlThrDefKeepBlanksDefaultValue': True,
|
||||
'xmlThrDefLineNumbersDefaultValue': True,
|
||||
'xmlThrDefLoadExtDtdDefaultValue': True,
|
||||
'xmlThrDefParserDebugEntities': True,
|
||||
'xmlThrDefPedanticParserDefaultValue': True,
|
||||
'xmlThrDefSaveNoEmptyTags': True,
|
||||
'xmlThrDefSubstituteEntitiesDefaultValue': True,
|
||||
|
103
testapi.c
103
testapi.c
@ -15422,38 +15422,6 @@ test_xmlThrDefLoadExtDtdDefaultValue(void) {
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
test_xmlThrDefParserDebugEntities(void) {
|
||||
int test_ret = 0;
|
||||
|
||||
int mem_base;
|
||||
int ret_val;
|
||||
int v; /* */
|
||||
int n_v;
|
||||
|
||||
for (n_v = 0;n_v < gen_nb_int;n_v++) {
|
||||
mem_base = xmlMemBlocks();
|
||||
v = gen_int(n_v, 0);
|
||||
|
||||
ret_val = xmlThrDefParserDebugEntities(v);
|
||||
desret_int(ret_val);
|
||||
call_tests++;
|
||||
des_int(n_v, v, 0);
|
||||
xmlResetLastError();
|
||||
if (mem_base != xmlMemBlocks()) {
|
||||
printf("Leak of %d blocks found in xmlThrDefParserDebugEntities",
|
||||
xmlMemBlocks() - mem_base);
|
||||
test_ret++;
|
||||
printf(" %d", n_v);
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
function_tests++;
|
||||
|
||||
return(test_ret);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
test_xmlThrDefPedanticParserDefaultValue(void) {
|
||||
int test_ret = 0;
|
||||
@ -15521,7 +15489,7 @@ static int
|
||||
test_parser(void) {
|
||||
int test_ret = 0;
|
||||
|
||||
if (quiet == 0) printf("Testing parser : 89 of 105 functions ...\n");
|
||||
if (quiet == 0) printf("Testing parser : 88 of 104 functions ...\n");
|
||||
test_ret += test_xmlByteConsumed();
|
||||
test_ret += test_xmlCleanupGlobals();
|
||||
test_ret += test_xmlClearNodeInfoSeq();
|
||||
@ -15616,7 +15584,6 @@ test_parser(void) {
|
||||
test_ret += test_xmlThrDefKeepBlanksDefaultValue();
|
||||
test_ret += test_xmlThrDefLineNumbersDefaultValue();
|
||||
test_ret += test_xmlThrDefLoadExtDtdDefaultValue();
|
||||
test_ret += test_xmlThrDefParserDebugEntities();
|
||||
test_ret += test_xmlThrDefPedanticParserDefaultValue();
|
||||
test_ret += test_xmlThrDefSubstituteEntitiesDefaultValue();
|
||||
|
||||
@ -24055,70 +24022,6 @@ test_xmlTextMerge(void) {
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
test_xmlThrDefBufferAllocScheme(void) {
|
||||
int test_ret = 0;
|
||||
|
||||
int mem_base;
|
||||
xmlBufferAllocationScheme ret_val;
|
||||
xmlBufferAllocationScheme v; /* */
|
||||
int n_v;
|
||||
|
||||
for (n_v = 0;n_v < gen_nb_xmlBufferAllocationScheme;n_v++) {
|
||||
mem_base = xmlMemBlocks();
|
||||
v = gen_xmlBufferAllocationScheme(n_v, 0);
|
||||
|
||||
ret_val = xmlThrDefBufferAllocScheme(v);
|
||||
desret_xmlBufferAllocationScheme(ret_val);
|
||||
call_tests++;
|
||||
des_xmlBufferAllocationScheme(n_v, v, 0);
|
||||
xmlResetLastError();
|
||||
if (mem_base != xmlMemBlocks()) {
|
||||
printf("Leak of %d blocks found in xmlThrDefBufferAllocScheme",
|
||||
xmlMemBlocks() - mem_base);
|
||||
test_ret++;
|
||||
printf(" %d", n_v);
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
function_tests++;
|
||||
|
||||
return(test_ret);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
test_xmlThrDefDefaultBufferSize(void) {
|
||||
int test_ret = 0;
|
||||
|
||||
int mem_base;
|
||||
int ret_val;
|
||||
int v; /* */
|
||||
int n_v;
|
||||
|
||||
for (n_v = 0;n_v < gen_nb_int;n_v++) {
|
||||
mem_base = xmlMemBlocks();
|
||||
v = gen_int(n_v, 0);
|
||||
|
||||
ret_val = xmlThrDefDefaultBufferSize(v);
|
||||
desret_int(ret_val);
|
||||
call_tests++;
|
||||
des_int(n_v, v, 0);
|
||||
xmlResetLastError();
|
||||
if (mem_base != xmlMemBlocks()) {
|
||||
printf("Leak of %d blocks found in xmlThrDefDefaultBufferSize",
|
||||
xmlMemBlocks() - mem_base);
|
||||
test_ret++;
|
||||
printf(" %d", n_v);
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
function_tests++;
|
||||
|
||||
return(test_ret);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
test_xmlThrDefDeregisterNodeDefault(void) {
|
||||
int test_ret = 0;
|
||||
@ -24383,7 +24286,7 @@ static int
|
||||
test_tree(void) {
|
||||
int test_ret = 0;
|
||||
|
||||
if (quiet == 0) printf("Testing tree : 146 of 172 functions ...\n");
|
||||
if (quiet == 0) printf("Testing tree : 144 of 170 functions ...\n");
|
||||
test_ret += test_xmlAddChild();
|
||||
test_ret += test_xmlAddChildList();
|
||||
test_ret += test_xmlAddNextSibling();
|
||||
@ -24532,8 +24435,6 @@ test_tree(void) {
|
||||
test_ret += test_xmlStringLenGetNodeList();
|
||||
test_ret += test_xmlTextConcat();
|
||||
test_ret += test_xmlTextMerge();
|
||||
test_ret += test_xmlThrDefBufferAllocScheme();
|
||||
test_ret += test_xmlThrDefDefaultBufferSize();
|
||||
test_ret += test_xmlThrDefDeregisterNodeDefault();
|
||||
test_ret += test_xmlThrDefRegisterNodeDefault();
|
||||
test_ret += test_xmlUnsetNsProp();
|
||||
|
Loading…
x
Reference in New Issue
Block a user