1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-30 22:43:14 +03:00

parser: Deprecate more internal functions

This commit is contained in:
Nick Wellnhofer
2023-03-13 19:38:41 +01:00
parent b51b99ef83
commit 3ffcc03b16
5 changed files with 44 additions and 0 deletions

View File

@ -330,6 +330,7 @@ XMLPUBFUN int
XMLPUBFUN xmlParserInputPtr
xmlNewStringInputStream (xmlParserCtxtPtr ctxt,
const xmlChar *buffer);
XML_DEPRECATED
XMLPUBFUN xmlParserInputPtr
xmlNewEntityInputStream (xmlParserCtxtPtr ctxt,
xmlEntityPtr entity);
@ -551,29 +552,38 @@ XMLPUBFUN xmlChar *
/*
* Generated by MACROS on top of parser.c c.f. PUSH_AND_POP.
*/
XML_DEPRECATED
XMLPUBFUN int nodePush (xmlParserCtxtPtr ctxt,
xmlNodePtr value);
XML_DEPRECATED
XMLPUBFUN xmlNodePtr nodePop (xmlParserCtxtPtr ctxt);
XMLPUBFUN int inputPush (xmlParserCtxtPtr ctxt,
xmlParserInputPtr value);
XMLPUBFUN xmlParserInputPtr inputPop (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN const xmlChar * namePop (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN int namePush (xmlParserCtxtPtr ctxt,
const xmlChar *value);
/*
* other commodities shared between parser.c and parserInternals.
*/
XML_DEPRECATED
XMLPUBFUN int xmlSkipBlankChars (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN int xmlStringCurrentChar (xmlParserCtxtPtr ctxt,
const xmlChar *cur,
int *len);
XML_DEPRECATED
XMLPUBFUN void xmlParserHandlePEReference(xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN int xmlCheckLanguageID (const xmlChar *lang);
/*
* Really core function shared with HTML parser.
*/
XML_DEPRECATED
XMLPUBFUN int xmlCurrentChar (xmlParserCtxtPtr ctxt,
int *len);
XMLPUBFUN int xmlCopyCharMultiByte (xmlChar *out,
@ -581,6 +591,7 @@ XMLPUBFUN int xmlCopyCharMultiByte (xmlChar *out,
XMLPUBFUN int xmlCopyChar (int len,
xmlChar *out,
int val);
XML_DEPRECATED
XMLPUBFUN void xmlNextChar (xmlParserCtxtPtr ctxt);
XML_DEPRECATED
XMLPUBFUN void xmlParserInputShrink (xmlParserInputPtr in);

View File

@ -1376,6 +1376,8 @@ xmlCleanSpecialAttr(xmlParserCtxtPtr ctxt)
* xmlCheckLanguageID:
* @lang: pointer to the string value
*
* DEPRECATED: Internal function, do not use.
*
* Checks that the value conforms to the LanguageID production:
*
* NOTE: this is somewhat deprecated, those productions were removed from
@ -1750,6 +1752,8 @@ inputPop(xmlParserCtxtPtr ctxt)
* @ctxt: an XML parser context
* @value: the element node
*
* DEPRECATED: Internal function, do not use.
*
* Pushes a new element node on top of the node stack
*
* Returns -1 in case of error, the index in the stack otherwise
@ -1788,6 +1792,8 @@ nodePush(xmlParserCtxtPtr ctxt, xmlNodePtr value)
* nodePop:
* @ctxt: an XML parser context
*
* DEPRECATED: Internal function, do not use.
*
* Pops the top element node from the node stack
*
* Returns the node just removed
@ -1899,6 +1905,8 @@ nameNsPop(xmlParserCtxtPtr ctxt)
* @ctxt: an XML parser context
* @value: the element name
*
* DEPRECATED: Internal function, do not use.
*
* Pushes a new element name on top of the name stack
*
* Returns -1 in case of error, the index in the stack otherwise
@ -1926,10 +1934,13 @@ mem_error:
xmlErrMemory(ctxt, NULL);
return (-1);
}
/**
* namePop:
* @ctxt: an XML parser context
*
* DEPRECATED: Internal function, do not use.
*
* Pops the top element name from the name stack
*
* Returns the name just removed
@ -2098,6 +2109,8 @@ static int spacePop(xmlParserCtxtPtr ctxt) {
* xmlSkipBlankChars:
* @ctxt: the XML parser context
*
* DEPRECATED: Internal function, do not use.
*
* skip all blanks character found at that point in the input streams.
* It pops up finished entities in the process if allowable at that point.
*
@ -2473,6 +2486,8 @@ xmlParseStringCharRef(xmlParserCtxtPtr ctxt, const xmlChar **str) {
* xmlParserHandlePEReference:
* @ctxt: the parser context
*
* DEPRECATED: Internal function, do not use.
*
* [69] PEReference ::= '%' Name ';'
*
* [ WFC: No Recursion ]

View File

@ -513,6 +513,8 @@ xmlParserInputShrink(xmlParserInputPtr in) {
* xmlNextChar:
* @ctxt: the XML parser context
*
* DEPRECATED: Internal function, do not use.
*
* Skip to the next char input char.
*/
@ -658,6 +660,8 @@ encoding_error:
* @ctxt: the XML parser context
* @len: pointer to the length of the char read
*
* DEPRECATED: Internal function, do not use.
*
* The current char value, if using UTF-8 this may actually span multiple
* bytes in the input buffer. Implement the end of line normalization:
* 2.11 End-of-Line Handling
@ -818,6 +822,8 @@ encoding_error:
* @cur: pointer to the beginning of the char
* @len: pointer to the length of the char read
*
* DEPRECATED: Internal function, do not use.
*
* The current char value, if using UTF-8 this may actually span multiple
* bytes in the input buffer.
*
@ -1394,6 +1400,8 @@ xmlNewIOInputStream(xmlParserCtxtPtr ctxt, xmlParserInputBufferPtr input,
* @ctxt: an XML parser context
* @entity: an Entity pointer
*
* DEPRECATED: Internal function, do not use.
*
* Create a new input stream based on an xmlEntityPtr
*
* Returns the new input stream or NULL

View File

@ -293,6 +293,11 @@ deprecated_funcs = {
'htmlInitAutoClose': True,
'htmlParseCharRef': True,
'htmlParseElement': True,
'namePop': True,
'namePush': True,
'nodePop': True,
'nodePush': True,
'xmlCheckLanguageID': True,
'xmlCleanupCharEncodingHandlers': True,
'xmlCleanupGlobals': True,
'xmlDefaultSAXHandlerInit': True,
@ -312,6 +317,7 @@ deprecated_funcs = {
'xmlNanoFTPProxy': True,
'xmlNanoFTPScanProxy': True,
'xmlNewGlobalNs': True,
'xmlNextChar': True,
'xmlParseAttValue': True,
'xmlParseAttributeListDecl': True,
'xmlParseCDSect': True,
@ -346,6 +352,7 @@ deprecated_funcs = {
'xmlParseVersionInfo': True,
'xmlParseVersionNum': True,
'xmlParseXMLDecl': True,
'xmlParserHandlePEReference': True,
'xmlParserHandleReference': True,
'xmlRecoverDoc': True,
'xmlRecoverFile': True,
@ -358,6 +365,7 @@ deprecated_funcs = {
'xmlSchemaCleanupTypes': True,
'xmlSchemaInitTypes': True,
'xmlSetupParserForBuffer': True,
'xmlSkipBlankChars': True,
'xmlStringDecodeEntities': True,
'xmlStringLenDecodeEntities': True,
'xmlThrDefDefaultBufferSize': True,

View File

@ -5,6 +5,8 @@
* copy: see Copyright for the status of this software.
*/
#define XML_DEPRECATED
#include <stdio.h>
#include <string.h>
#include <libxml/tree.h>