mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-20 18:50:08 +03:00
legacy: Remove legacy symbols
This commit is contained in:
parent
3250a01dc2
commit
cdc5cfed0b
@ -86,7 +86,7 @@ if(LIBXML2_WITH_PYTHON)
|
||||
CACHE PATH "Python bindings install directory")
|
||||
endif()
|
||||
|
||||
foreach(VARIABLE IN ITEMS WITH_C14N WITH_CATALOG WITH_DEBUG WITH_HTML WITH_HTTP WITH_ICONV WITH_ICU WITH_ISO8859X WITH_LEGACY WITH_LZMA WITH_MODULES WITH_OUTPUT WITH_PATTERN WITH_PUSH WITH_READER WITH_REGEXPS WITH_RELAXNG WITH_SAX1 WITH_SCHEMAS WITH_SCHEMATRON WITH_THREADS WITH_THREAD_ALLOC WITH_VALID WITH_WRITER WITH_XINCLUDE WITH_XPATH WITH_XPTR WITH_ZLIB)
|
||||
foreach(VARIABLE IN ITEMS WITH_C14N WITH_CATALOG WITH_DEBUG WITH_HTML WITH_HTTP WITH_ICONV WITH_ICU WITH_ISO8859X WITH_LZMA WITH_MODULES WITH_OUTPUT WITH_PATTERN WITH_PUSH WITH_READER WITH_REGEXPS WITH_RELAXNG WITH_SAX1 WITH_SCHEMAS WITH_SCHEMATRON WITH_THREADS WITH_THREAD_ALLOC WITH_VALID WITH_WRITER WITH_XINCLUDE WITH_XPATH WITH_XPTR WITH_ZLIB)
|
||||
if(LIBXML2_${VARIABLE})
|
||||
set(${VARIABLE} 1)
|
||||
else()
|
||||
@ -259,9 +259,6 @@ endif()
|
||||
if(LIBXML2_WITH_HTTP)
|
||||
list(APPEND LIBXML2_SRCS nanohttp.c)
|
||||
endif()
|
||||
if(LIBXML2_WITH_LEGACY)
|
||||
list(APPEND LIBXML2_SRCS legacy.c)
|
||||
endif()
|
||||
if(LIBXML2_WITH_LZMA)
|
||||
list(APPEND LIBXML2_SRCS xzlib.c)
|
||||
endif()
|
||||
|
@ -68,9 +68,6 @@ endif
|
||||
if WITH_HTTP_SOURCES
|
||||
libxml2_la_SOURCES += nanohttp.c
|
||||
endif
|
||||
if WITH_LEGACY_SOURCES
|
||||
libxml2_la_SOURCES += legacy.c
|
||||
endif
|
||||
if WITH_LZMA_SOURCES
|
||||
libxml2_la_SOURCES += xzlib.c
|
||||
endif
|
||||
|
@ -452,15 +452,6 @@ fi
|
||||
AC_SUBST(WITH_HTTP)
|
||||
AM_CONDITIONAL(WITH_HTTP_SOURCES, test "$WITH_HTTP" = "1")
|
||||
|
||||
if test "$with_legacy" != "yes" ; then
|
||||
WITH_LEGACY=0
|
||||
else
|
||||
echo Enabling deprecated APIs
|
||||
WITH_LEGACY=1
|
||||
fi
|
||||
AC_SUBST(WITH_LEGACY)
|
||||
AM_CONDITIONAL(WITH_LEGACY_SOURCES, test "$WITH_LEGACY" = "1")
|
||||
|
||||
if test "$with_reader" = "no" ; then
|
||||
echo Disabling the xmlReader parsing interface
|
||||
WITH_READER=0
|
||||
|
@ -21,7 +21,6 @@ debugsym=None
|
||||
ignored_files = {
|
||||
"config.h": "generated portability layer",
|
||||
"libxml.h": "internal only",
|
||||
"legacy.c": "legacy code",
|
||||
"testModule.c": "test tool",
|
||||
"testapi.c": "generated regression tests",
|
||||
"runtest.c": "regression tests program",
|
||||
|
@ -3293,7 +3293,6 @@
|
||||
<exports symbol='LIBXML_ICONV_ENABLED' type='macro'/>
|
||||
<exports symbol='LIBXML_ICU_ENABLED' type='macro'/>
|
||||
<exports symbol='LIBXML_ISO8859X_ENABLED' type='macro'/>
|
||||
<exports symbol='LIBXML_LEGACY_ENABLED' type='macro'/>
|
||||
<exports symbol='LIBXML_LZMA_ENABLED' type='macro'/>
|
||||
<exports symbol='LIBXML_MODULES_ENABLED' type='macro'/>
|
||||
<exports symbol='LIBXML_MODULE_EXTENSION' type='macro'/>
|
||||
@ -3850,9 +3849,6 @@
|
||||
<macro name='LIBXML_ISO8859X_ENABLED' file='xmlversion'>
|
||||
<info>Whether ISO-8859-* support is made available in case iconv is not</info>
|
||||
</macro>
|
||||
<macro name='LIBXML_LEGACY_ENABLED' file='xmlversion'>
|
||||
<info>Whether the deprecated APIs are compiled in for compatibility</info>
|
||||
</macro>
|
||||
<macro name='LIBXML_LZMA_ENABLED' file='xmlversion'>
|
||||
<info>Whether the Lzma support is compiled in</info>
|
||||
</macro>
|
||||
|
38
globals.c
38
globals.c
@ -261,7 +261,7 @@ const int xmlParserDebugEntities = 0;
|
||||
* Global setting, indicate that the parser should work in validating mode.
|
||||
* Disabled by default.
|
||||
*/
|
||||
#if !defined(LIBXML_THREAD_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
#if !defined(LIBXML_THREAD_ENABLED)
|
||||
int xmlDoValidityCheckingDefaultValue = 0;
|
||||
#endif
|
||||
static int xmlDoValidityCheckingDefaultValueThrDef = 0;
|
||||
@ -273,7 +273,7 @@ static int xmlDoValidityCheckingDefaultValueThrDef = 0;
|
||||
* Global setting, indicate that the DTD validation should provide warnings.
|
||||
* Activated by default.
|
||||
*/
|
||||
#if !defined(LIBXML_THREAD_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
#if !defined(LIBXML_THREAD_ENABLED)
|
||||
int xmlGetWarningsDefaultValue = 1;
|
||||
#endif
|
||||
static int xmlGetWarningsDefaultValueThrDef = 1;
|
||||
@ -286,7 +286,7 @@ static int xmlGetWarningsDefaultValueThrDef = 1;
|
||||
* validating.
|
||||
* Disabled by default.
|
||||
*/
|
||||
#if !defined(LIBXML_THREAD_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
#if !defined(LIBXML_THREAD_ENABLED)
|
||||
int xmlLoadExtDtdDefaultValue = 0;
|
||||
#endif
|
||||
static int xmlLoadExtDtdDefaultValueThrDef = 0;
|
||||
@ -298,7 +298,7 @@ static int xmlLoadExtDtdDefaultValueThrDef = 0;
|
||||
* Global setting, indicate that the parser be pedantic
|
||||
* Disabled by default.
|
||||
*/
|
||||
#if !defined(LIBXML_THREAD_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
#if !defined(LIBXML_THREAD_ENABLED)
|
||||
int xmlPedanticParserDefaultValue = 0;
|
||||
#endif
|
||||
static int xmlPedanticParserDefaultValueThrDef = 0;
|
||||
@ -312,7 +312,7 @@ static int xmlPedanticParserDefaultValueThrDef = 0;
|
||||
* Disabled by default since this may not be safe for old classes of
|
||||
* application.
|
||||
*/
|
||||
#if !defined(LIBXML_THREAD_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
#if !defined(LIBXML_THREAD_ENABLED)
|
||||
int xmlLineNumbersDefaultValue = 0;
|
||||
#endif
|
||||
static int xmlLineNumbersDefaultValueThrDef = 0;
|
||||
@ -327,7 +327,7 @@ static int xmlLineNumbersDefaultValueThrDef = 0;
|
||||
* conformant to the XML Recommendation, however the option is kept
|
||||
* for some applications since this was libxml1 default behaviour.
|
||||
*/
|
||||
#if !defined(LIBXML_THREAD_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
#if !defined(LIBXML_THREAD_ENABLED)
|
||||
int xmlKeepBlanksDefaultValue = 1;
|
||||
#endif
|
||||
static int xmlKeepBlanksDefaultValueThrDef = 1;
|
||||
@ -342,7 +342,7 @@ static int xmlKeepBlanksDefaultValueThrDef = 1;
|
||||
* the XPath data model requires entities replacement and the XPath
|
||||
* engine does not handle entities references transparently.
|
||||
*/
|
||||
#if !defined(LIBXML_THREAD_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
#if !defined(LIBXML_THREAD_ENABLED)
|
||||
int xmlSubstituteEntitiesDefaultValue = 0;
|
||||
#endif
|
||||
static int xmlSubstituteEntitiesDefaultValueThrDef = 0;
|
||||
@ -352,7 +352,7 @@ static int xmlSubstituteEntitiesDefaultValueThrDef = 0;
|
||||
*
|
||||
* DEPRECATED: Don't use
|
||||
*/
|
||||
#if !defined(LIBXML_THREAD_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
#if !defined(LIBXML_THREAD_ENABLED)
|
||||
xmlRegisterNodeFunc xmlRegisterNodeDefaultValue = NULL;
|
||||
#endif
|
||||
static xmlRegisterNodeFunc xmlRegisterNodeDefaultValueThrDef = NULL;
|
||||
@ -362,7 +362,7 @@ static xmlRegisterNodeFunc xmlRegisterNodeDefaultValueThrDef = NULL;
|
||||
*
|
||||
* DEPRECATED: Don't use
|
||||
*/
|
||||
#if !defined(LIBXML_THREAD_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
#if !defined(LIBXML_THREAD_ENABLED)
|
||||
xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue = NULL;
|
||||
#endif
|
||||
static xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValueThrDef = NULL;
|
||||
@ -372,7 +372,7 @@ static xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValueThrDef = NULL;
|
||||
*
|
||||
* DEPRECATED: Don't use
|
||||
*/
|
||||
#if !defined(LIBXML_THREAD_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
#if !defined(LIBXML_THREAD_ENABLED)
|
||||
xmlParserInputBufferCreateFilenameFunc
|
||||
xmlParserInputBufferCreateFilenameValue = NULL;
|
||||
#endif
|
||||
@ -384,7 +384,7 @@ xmlParserInputBufferCreateFilenameValueThrDef = NULL;
|
||||
*
|
||||
* DEPRECATED: Don't use
|
||||
*/
|
||||
#if !defined(LIBXML_THREAD_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
#if !defined(LIBXML_THREAD_ENABLED)
|
||||
xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue = NULL;
|
||||
#endif
|
||||
static xmlOutputBufferCreateFilenameFunc
|
||||
@ -397,7 +397,7 @@ xmlOutputBufferCreateFilenameValueThrDef = NULL;
|
||||
*
|
||||
* Global setting: function used for generic error callbacks
|
||||
*/
|
||||
#if !defined(LIBXML_THREAD_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
#if !defined(LIBXML_THREAD_ENABLED)
|
||||
xmlGenericErrorFunc xmlGenericError = xmlGenericErrorDefaultFunc;
|
||||
#endif
|
||||
static xmlGenericErrorFunc xmlGenericErrorThrDef = xmlGenericErrorDefaultFunc;
|
||||
@ -408,7 +408,7 @@ static xmlGenericErrorFunc xmlGenericErrorThrDef = xmlGenericErrorDefaultFunc;
|
||||
*
|
||||
* Global setting: function used for structured error callbacks
|
||||
*/
|
||||
#if !defined(LIBXML_THREAD_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
#if !defined(LIBXML_THREAD_ENABLED)
|
||||
xmlStructuredErrorFunc xmlStructuredError = NULL;
|
||||
#endif
|
||||
static xmlStructuredErrorFunc xmlStructuredErrorThrDef = NULL;
|
||||
@ -419,7 +419,7 @@ static xmlStructuredErrorFunc xmlStructuredErrorThrDef = NULL;
|
||||
*
|
||||
* Global setting passed to generic error callbacks
|
||||
*/
|
||||
#if !defined(LIBXML_THREAD_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
#if !defined(LIBXML_THREAD_ENABLED)
|
||||
void *xmlGenericErrorContext = NULL;
|
||||
#endif
|
||||
static void *xmlGenericErrorContextThrDef = NULL;
|
||||
@ -430,11 +430,11 @@ static void *xmlGenericErrorContextThrDef = NULL;
|
||||
*
|
||||
* Global setting passed to structured error callbacks
|
||||
*/
|
||||
#if !defined(LIBXML_THREAD_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
#if !defined(LIBXML_THREAD_ENABLED)
|
||||
void *xmlStructuredErrorContext = NULL;
|
||||
#endif
|
||||
static void *xmlStructuredErrorContextThrDef = NULL;
|
||||
#if !defined(LIBXML_THREAD_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
#if !defined(LIBXML_THREAD_ENABLED)
|
||||
xmlError xmlLastError;
|
||||
#endif
|
||||
|
||||
@ -450,7 +450,7 @@ xmlError xmlLastError;
|
||||
* Global setting, asking the serializer to indent the output tree by default
|
||||
* Enabled by default
|
||||
*/
|
||||
#if !defined(LIBXML_THREAD_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
#if !defined(LIBXML_THREAD_ENABLED)
|
||||
int xmlIndentTreeOutput = 1;
|
||||
#endif
|
||||
static int xmlIndentTreeOutputThrDef = 1;
|
||||
@ -463,7 +463,7 @@ static int xmlIndentTreeOutputThrDef = 1;
|
||||
* The string used to do one-level indent. By default is equal to
|
||||
* " " (two spaces)
|
||||
*/
|
||||
#if !defined(LIBXML_THREAD_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
#if !defined(LIBXML_THREAD_ENABLED)
|
||||
const char *xmlTreeIndentString = " ";
|
||||
#endif
|
||||
static const char *xmlTreeIndentStringThrDef = " ";
|
||||
@ -478,7 +478,7 @@ static const char *xmlTreeIndentStringThrDef = " ";
|
||||
* once parsed.
|
||||
* Disabled by default
|
||||
*/
|
||||
#if !defined(LIBXML_THREAD_ENABLED) || defined(LIBXML_LEGACY_ENABLED)
|
||||
#if !defined(LIBXML_THREAD_ENABLED)
|
||||
int xmlSaveNoEmptyTags = 0;
|
||||
#endif
|
||||
static int xmlSaveNoEmptyTagsThrDef = 0;
|
||||
|
@ -1284,28 +1284,6 @@ XMLPUBFUN void
|
||||
XMLPUBFUN xmlParserCtxtPtr
|
||||
xmlCreateDocParserCtxt (const xmlChar *cur);
|
||||
|
||||
#ifdef LIBXML_LEGACY_ENABLED
|
||||
/** DOC_DISABLE */
|
||||
/*
|
||||
* Reading/setting optional parsing features.
|
||||
*/
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlGetFeaturesList (int *len,
|
||||
const char **result);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlGetFeature (xmlParserCtxtPtr ctxt,
|
||||
const char *name,
|
||||
void *result);
|
||||
XML_DEPRECATED
|
||||
XMLPUBFUN int
|
||||
xmlSetFeature (xmlParserCtxtPtr ctxt,
|
||||
const char *name,
|
||||
void *value);
|
||||
/** DOC_ENABLE */
|
||||
#endif /* LIBXML_LEGACY_ENABLED */
|
||||
|
||||
#ifdef LIBXML_PUSH_ENABLED
|
||||
/*
|
||||
* Interfaces for the Push mode.
|
||||
|
@ -155,11 +155,9 @@
|
||||
/**
|
||||
* LIBXML_LEGACY_ENABLED:
|
||||
*
|
||||
* Whether the deprecated APIs are compiled in for compatibility
|
||||
* Removed in 2.14
|
||||
*/
|
||||
#if @WITH_LEGACY@
|
||||
#define LIBXML_LEGACY_ENABLED
|
||||
#endif
|
||||
#undef LIBXML_LEGACY_ENABLED
|
||||
|
||||
/**
|
||||
* LIBXML_C14N_ENABLED:
|
||||
|
@ -452,7 +452,6 @@ xml_opt_src = [
|
||||
[want_debug, ['debugXML.c']],
|
||||
[want_html, ['HTMLparser.c', 'HTMLtree.c']],
|
||||
[want_http, ['nanohttp.c']],
|
||||
[want_legacy, ['legacy.c']],
|
||||
[want_lzma, ['xzlib.c']],
|
||||
[want_modules, ['xmlmodule.c']],
|
||||
[want_output, ['xmlsave.c']],
|
||||
|
4
parser.c
4
parser.c
@ -587,11 +587,7 @@ xmlHasFeature(xmlFeature feature)
|
||||
return(0);
|
||||
#endif
|
||||
case XML_WITH_LEGACY:
|
||||
#ifdef LIBXML_LEGACY_ENABLED
|
||||
return(1);
|
||||
#else
|
||||
return(0);
|
||||
#endif
|
||||
case XML_WITH_C14N:
|
||||
#ifdef LIBXML_C14N_ENABLED
|
||||
return(1);
|
||||
|
@ -143,9 +143,6 @@ skipped_functions = [
|
||||
"xmlParseXMLDecl", "xmlParseTextDecl", "xmlParseMisc",
|
||||
"xmlParseExternalSubset", "xmlParserHandlePEReference",
|
||||
"xmlSkipBlankChars",
|
||||
# Legacy
|
||||
"xmlCleanupPredefinedEntities", "xmlInitializePredefinedEntities",
|
||||
"xmlSetFeature", "xmlGetFeature", "xmlGetFeaturesList",
|
||||
# Shouldn't free result
|
||||
"xmlCtxtGetDict",
|
||||
]
|
||||
|
Loading…
x
Reference in New Issue
Block a user